We are trying to take an existing app and integrate liquibase. Our db is currently created by hibernate annotations. We need to support hsqldb, h2, msql, sqlserver, and oracle. The approach we have attempted to take is to first let hibernate create a db in one of the vendor specific databases. Then we use liquibase to generate a changelog.xml. Then we wipe out the db and let liquibase recreate it using the just created changelog.xml.
We have found the following:
- the changelog.xml is not portable across any of the databases. In some cases minor tweaks are needed and in others big tweaks are needed. Seems very difficult to get a changelog.xml that is portable across all vendors’ dbs.
- hibernate validation fails when letting liquibase create the db first and then letting hibernate validate the db even though the same vendors db is used to both generate the changelog.xml and recreate the database using the changelog.xml. We can turn off hibernate validation and the app seems to work, but it is odd that liquibase generates a db with types that are dissimilar enough to cause hibernate validation to fail.
What are other peoples experience with the portability of changelogs across database vendors? Are we expecting too much from liquibase?