Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Liquibase is it OK to have an empty line on splitstatements?

In Liquibase is it OK to have an empty line on splitstatements?

Bellow I want to execute 2 statements:

--changeset me:1 runAlways:false runOnChange:false failOnError:true splitStatements:true endDelimiter:;
update my_table
set    col = 1
where  col is null;

alter table my_table modify col not null;
like image 751
user5507535 Avatar asked Nov 15 '25 19:11

user5507535


1 Answers

Yes it's ok to have an empty line in between multiple queries to be executed. splitStatements basically search for the provided end-delimeter and splits multiple queries for execution. So having a new line would not cause any issue. The changeset snippet you provided in the question should work.

By default the value of splitStatements is set to true which splits the statements on ;s. Have a look at splitStatements attribute in liquibase document here.

like image 151
Rakhi Agrawal Avatar answered Nov 18 '25 11:11

Rakhi Agrawal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!