-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Optimise the logic for tableIsEmpty check constraint #4834
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tati-qalified could you please check if tableIsEmpty still works as expected?
Also created https://datical.atlassian.net/browse/PD-3741 cc @filipelautert
https://docs.liquibase.com/concepts/changelogs/preconditions.html#available-preconditions
Fix for the test failure https://github.com/liquibase/liquibase-pro-tests/pull/969 |
@rberezen the precondition is working as expected with an xml format changelog. I wasn't able to find how to implement the precondition for other formats, if it's even supported, so I didn't test those cases. |
23a5ed4
to
b9bae56
Compare
Impact
Description
Optimise the logic for verifying if a table is empty: instead of selecting count the table, uses exists.
Things to be aware of
SQL Ansi for all databases query.
Things to worry about
NA
Additional Context
Added tests. Fixes #4734