Liquibase 2.0 introduces several non-compatible changes that will require action to upgrade from 1.9 to 2.0. Please update this wiki page with additional issues or work-arounds you find. For a list of new features in 2.0, see the 2.0 features list
This page will be updated regularly up to and beyond the 2.0 final release.
Liquibase stores checksums for each change executed in the DATABASECHANGELOG table. These checksums are used to alert the user to changeSets that have been changed after they were executed, and to handle runOnChange=”true” changeSets.
The way we compute these checksums changed in 2.0. The first time you update an existing database, Liquibase will detect the old format and upgrade the checksum values. During this first run, Liquibase will not be able to detect modified changeSets or runOnChange requirements. If you are concerned about this, you may want to run a known unchanged changelog against the database with 2.0 before updating your new changelog.
The format of the XSD definition has changed. The new format looks like:
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
The modifyColumn tag has been deprecated and moved to the extension portal. If you are using modifyColumn, consider the new
<modifyDataType> or other more specific commands (addPrimaryKeyConstraint, etc). You can continue to use the modifyColumn tag if you include modify-column-2.0.0.jar in your classpath. See modifyColumn library to get this jar.
Liquibase 2.0 will silently add three columns to your DATABASECHANGELOG table: Tag, OrderExecuted, and ExecType. Older versions of Liquibase will be incompatible with this table because they will not supply values for these columns, two of which are not nullable.
SQL to manually make these changes is (may vary based on database):
ALTER TABLE DATABASECHANGELOG ADD TAG VARCHAR(255); ALTER TABLE DATABASECHANGELOG ADD ORDEREXECUTED INT; UPDATE DATABASECHANGELOG SET ORDEREXECUTED = -1; ALTER TABLE DATABASECHANGELOG MODIFY ORDEREXECUTED INT NOT NULL; ALTER TABLE DATABASECHANGELOG ADD EXECTYPE VARCHAR(10); UPDATE DATABASECHANGELOG SET EXECTYPE = 'EXECUTED'; ALTER TABLE DATABASECHANGELOG MODIFY EXECTYPE VARCHAR(10) NOT NULL;
You should only need to use the above sql for updateSql calls.
The Hibernate integration has been moved to be a plugin rather than in the Liquibase core itself. If you use the Liquibase hibernate support, you’ll need to add the jar from the hibernate extension to your classpath.
To remove confusion, the baseUrl, baseUsername, etc parameters used in performing database diffs have changed to referenceUrl, referenceUsername, etc.
The artifact name of the Maven plugin changed to “org.liquibase : liquibase-maven-plugin” from “org.liquibase : liquibase-plugin”
The class name of LiquibaseServletListener changed to liquibase.integration.servlet.LiquibaseServletListener.
The context parameter names changed:
The class name of the SpringLiquibase class has changed to liquibase.integration.spring.SpringLiquibase
Many other classes changed their packages and/or names significantly. If you have more complex Liquibase integration and are not sure how to convert your code, post a question on the forum
Liquibase expects a Liquibase-Package property in a MANIFEST.MF file. If you are using the standard liquibase.jar you don’t have to worry about it. But if you are embedding liquibase to the point of not including the standard MANIFEST.MF, make sure you add the following to your MANIFEST.MF
Liquibase-Package: liquibase.change, liquibase.database, liquibase.parser, liquibase.precondition, liquibase.serializer, liquibase.sqlgenerator, liquibase.executor, liquibase.snapshot, liquibase.logging, liquibase.ext