H2 drop table with cascade

Hi guys,

I got an issue with the “cascadeConstraints” attribute of the dropTable change. According to the documentation on the website the “cascadeConstraints” attribute should be supported for the H2 database, but when a run the next changeSet:

  1.      

the message “Database does not support drop with cascade” is returned.

I’m using two kinds of databases, namely the postgresql and the H2 (v1.3.173) databases. The postgresql database is used in the production and development environment and the H2 database is used as an in memory database for the unit tests. So the two database aren’t used simultaneously. The Liquibase version I’m using is 3.0.4.

I have looked into the liquibase core code and according to AbstractJdbcDatabase.supportsDropTableCascadeConstraints only sqlite, sybase, sybaseASA, postgres and oracle are supporting this call. I also checked the H2Database class, but it doesn’t override the support method so the result will remain false. The changeset is working as expected for the postgresql database.

According to the H2 documentation on the H2 website, the cascade options is supported by their database.

Any idea?

It may be a newer feature in H2 than when I originally created the DropTable generation code.


I created https://liquibase.jira.com/browse/CORE-1703 to track the feature.


Nathan