Need some help with managing data in tables

We are currently using liquibase pretty successfully to track and maintain our database schema changes. However, we have some “static” data which we would like to track in liquibase and I was wondering if anyone had some suggestions on how to do this. I am not sure liquibase is the best way to do this, but I am hoping I can do it with liquibase.

So we have some “static” data, for example a user roles table which is fixed. Each user has a role_id and then that maps to the roles table. The roles table hasn’t changed yet but I am about to add some more roles to it. I would like to have a way of tracking this somewhere so that when we upgrade our customer’s systems, part of the upgrade process will add the new roles. I was thinking about just doing a liquibase change with a new SQL statement to add the new row, but I don’t want this information to be intermingled with our schema changes.

This isn’t the only static data we have in the database…there is other stuff as well which needs to be managed in the same manner.

Is liquibase the best way to do this?

Thanks


I came across the loadUpdateData command. I’m confused as to how to use it though. If this command is part of the changelog how can I make sure it is run every time a change is made to the source csv files?

Hmm OK so that only looks like it works with Oracle. Is there a similar solution for MySQL?

I also have similar issue. Change management of the data in .CSV files is really painful. Did you find any solutions?

 

Nothing simple. We ended up loading the data with dbunit, and we have an ant build script so we just load the data every time we run liquibase.

We use the <span data should be small (relative to the rest of the set of data your app is likely to accumulate over time).

Best,
Laird


http://about.me/lairdnelson