I have integrated Liquibase for installing our application from a Hibernate Mapping including ForeignKey, Indexes, Id-Generators and UniqueKeys and to upgrade existing customer installations by using xml-changelog files.
So whenever a new feature requires a db-change we add both the hibernate annotations and a according changeset.
My problem is that if I install the application for the first time, I have no way to find out which ChangeSets are already included by the Installer (Hibernate Mapping) and which ones must be included by the Updater because the Installer doesn’t know about them. At this time the DATABASECHANGELOG Table is empty, so by default all changesets are shown.
I thought of a solution based on a release date. The Updater only includes changesets released after the installation date.
This might be realized by:
Introduce a new optional attribute (releaseDate=“2010-11-15 12:00:00”) to ChangeSets. (@Nathan: I will create a improvement-issue in Jira and attach a patch if this way is ok with you.)
Write a Liquibase extention <ext:released on=“2010-11-15 12:00:00” />
What do you think about that? Are there any alternatives for solving my problem?