Hello,
We are trying to uplift the Liquibase from version 4.9.1 to 4.19.0 and upon that our changeset execution has been failing due to following error:
caused by: liquibase.exception.MigrationFailedException: Migration failed for changeset liquibase/change-log/test-change-log.xml::1.0.0-SNAPSHOT.000::Test:
Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near “insert”
Position: 97 [Failed SQL: (0) begin;
create table testSql (
id int primary key,
name varchar(255)
)
– statementSeparator
insert into testSql (id,name) values (1,‘Sample’)
– statementSeparator
Please note that we have been using ‘-- statementSeparator’ as endDelimiter for long time but seems with latest 4.19.0 version of Liquibase, it cannot interpret that as an end Delimiter and instead trying to execute the whole sql as one statement.
Snippet from changelog xml
Create schema for version 1.0.0-SNAPSHOT.000
Snippet from sql file
begin;
create table test2Sql (
id int primary key,
name varchar(255)
)
– statementSeparator
insert into test2Sql (id,name) values (1,‘Sample’)
– statementSeparator
commit;
My questions are:
- What has changed between versions 4.9.1 and 4.19.0 that it cannot process the schema generated with ‘–statementSeparator’ ?
- Is there an easier way for mitigate this problem instead of having to re-think of using some other end delimiter?
This is really blocking us from moving ahead so any quick help would be much appreciated. Thanks again !