objectQuotingStrategy="QUOTE_ALL_OBJECTS" not works correctly in H2, HSQLDB


I've been using Liquibase to generate the diff between each change to Postgresql then try to apply the diff to some other databases: Mysql, H2, HSQL.

The change is very simple as I'm just testing, i.e: v1.0 using Liquibase to generate the output of current schema (it works fine for all databases). Next, I add one object (table) with 2 properties and add this object as a property of another object, it still works fine. Next, I remove the new created object completely, it also works fine. Next, I just revert the previous step and rename the object and add it back again. This step makes H2, HSQL confused with error in SQL syntax like:

I check with Maven liquibase:updateSQL and I think the problem is even I set with objectQuotingStrategy="QUOTE_ALL_OBJECTS", it still generates without quote for identifiers like Table name, Column name, so H2, HSQL automatically uses the capital cases and then the error appeared.

Example from the migrate.sql generated by Liquibase

I don't know why it could happen in Liquibase for this case only for theses embedded databases as the change can apply well to at least postgresql and mysql. So I cannot use Liquibase for these embedded databases, attach is the database created to db.changelog-v1.2.xml and cannot be updated to db.changelog-v1.3.xml.


Centos 7





Phạm Hữu Bằng



Affects versions