liquibase-percona
liquibase-percona copied to clipboard
Add property 'liquibase.percona.failIfMultipleSQLStatementsFound=true/false'
Hey, I would like to suggest a boolean property like liquibase.percona.failIfMultipleSQLStatementsFound.
This property would be closely related to: https://github.com/liquibase/liquibase-percona/blob/main/src/main/java/liquibase/ext/percona/PerconaRawSQLChange.java#L139
How would it work?
-
When
liquibase.percona.failIfMultipleSQLStatementsFound=false, then: I would expect exactly what is happening right now: logging a warn and continuing with typical non-percona toolkit migration. -
When
liquibase.percona.failIfMultipleSQLStatementsFound=true, then: In case ofmultiLineSQL.length != 1, I would suggest log an error, and throw an exception. Such approach would be very useful, by making sure that all migrations are done with percona toolkit or nothing is being done to schema.
I think that this is a really small change to the original code, however because of it we would be able to achieve deployments even with less downtimes, as a traditional migration would not be run by accident (or simply inattentiveness to the statements written).
Edit: Change the property to be matching the overall standard.