scenario:
I have 3 databases, No.1 is initialized with version 1.0.0, No.2 is But is there a way to upgrade No.2 from 1.1.0 to 2.0.0?(Ignore the changeset of 1.1.0 without modify any of changelog.xml)
maybe read database version from a table and ignore some changesets
In some conditions database is initialized with latest scripts, start from version 1.0.0 is ugly, so databasechangelog is empty and liquibase doesn’t known the current version of database.
I don’t know if what you are proposing is a good way of thinking about this. Though you may think of the schemas as being at a specific version, Liquibase thinks of them as sets of changes. You can label a particular union of sets of changes as having a particular label or version, but that version needs to be the union of all the changes. If version 1.0.0 has changes A, B, C, and version 1.1.0 has changes A, B, C, and D, then version 2.0 must, by necessity, include A, B, C, and D, plus any additional changes for 2.0.
There may be specific sets of changes that will work in this kind of scenario, but without examining the exact set of changes, it is impossible to say beforehand whether this would work. For it to work, the set of changes between version 1.0 and 1.1 would have to be things that cancelled each other out or that were otherwise inconsequential to the operation of the software.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/