I’ve just entered a project where they have been using Liquibase for a while. They have had their first release. The first release is always easy since there is no previous database to consider.
Since knowledge of Liquibase has been limited in the project some not so good actions have been taken along the way.
For example, they have re-generated the changelog several times without thinking of that migrating their SystemTest, IntegrationTest and in the end Production environment with Liquibase would be impossible since changeSet’s in databasechangelog no longer match their changesets in xml.
The SystemTest environment is the first database that have to be migrated to the next version. In that database lots of data have been entered by test persons and we dont want to destroy that data.
The strategy I have been thinking of using is to find out the difference between the systemtest-db and a database generated by the latest changelog.xml. In that way I will have the delta. The base which is not the delta will be used as the baseline-schema xml. I then create records in systemtest-db’s databasechangelog table that matches the baseline-schema xml.
When the next release is finished I can run Liquibase update on my latest xml against the databasechangelog in systemtest db and will have that db up-to-date.
Is there a easier/better way of doing this?