Is there a running example somewhere with the new format with multiple changeset, I looked at the testcases for the parser and it looks like i need semicolon, but the behavior seems different.
Can someone please point me to the right direction?
You should keep the semicolon in there. The idea is to try to have the formatted SQL be a standard SQL script that liquibase just knows more of what to do with than the normal SQL, and like you said we test with the semicolon there.
In your above example, does sample 1 fail and sample 2 work correctly?
Hi, I am tring to use the formatted SQL feature for the changlog in version 2.0.1 If I keep the semicolon ( ; ) at the end, I see a Oracle exception Caused By: ORA-00911: invalid character When i remove the semicolon it does work, but i have some other issue when I add another Changeset ( look at the end of email. Is this feature completely working, I am using Oracle thin driver on Oracle XE instance.
Thanks adam
Sample changelog file-2 –liquibase formatted sql
–changeset adaml:1 CREATE TABLE test1 ( id int PRIMARY KEY, name varchar(255), age int )
–changeset adaml:2 alter table test add street1 varchar(255) NOT NULL
I still have to do some further checks but it looks like the root cause of my issue is a rather silly mistake on my part in calling the formatted sql file with
I appear to see the the same issue with liquibase 2.0.5 and oracle ojdbc 11.2.0.2.0. The following works fine without a semi-colon and fails when one is added. –liquibase formatted sql
–changeset john:1 CREATE TABLE NEWTABLE as select * from OLDTABLE;
The error is : [ERROR] --changeset john:1 [ERROR] CREATE TABLE NEWTABLE as select * from OLDTABLE;: ORA-00911: invalid character [ERROR] : [ERROR] Caused By: ORA-00911: invalid character [ERROR] -> [Help 1]
I also tried the test1 examples above which also fail.