Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add property 'liquibase.percona.failIfMultipleSQLStatementsFound=true/false' #514

Open
mbienkowski opened this issue Oct 14, 2024 · 0 comments

Comments

@mbienkowski
Copy link

mbienkowski commented Oct 14, 2024

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 of multiLineSQL.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.

@mbienkowski mbienkowski changed the title Add property 'liquibase.percona.failWhenMultipleSQLStatementsFound=true/false' Add property 'liquibase.percona.failIfMultipleSQLStatementsFound=true/false' Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants