-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 default catalog condition to SequenceSnapshotGenerator for Oracle #3152
Add default catalog condition to SequenceSnapshotGenerator for Oracle #3152
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.
Code review and test results:
Things to be aware of:
- The changes make sense to me. It's ensuring the catalog name is correctly set in the existing query
Things to worry about:
- Nothing
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.
PR prevents Oracle sequence owner being incorrectly set to "null" when catalogName is not specified on a changeset. Oracle defines the ALL_SEQUENCES.SEQUENCE_OWNER as not-null. This means that when a changeset does not include catalogName, it is safe to use the default catalog as the SEQUENCE_OWNER when querying for an Oracle sequence.
- Very nice new integration test added which makes the behavior very clear.
APPROVED
Thanks for your PR submission! We just finished reviewing and merging it into the 4.17.0 release on October 10, 2022. When you get a chance, could you please Star the Liquibase project? The star button is in the upper right corner of the screen. |
Impact
Description
When verifying if a sequence exists in a Oracle, Liquibase sets the column SEQUENCE_OWNER according to the catalog name provided in the changeset. If the catalog is not set, Liquibase will try to search for a SEQUENCE_OWNER='null'. We can set this value to the default catalog name of the database, because, according to the docs, this is a not null column: https://docs.oracle.com/en/database/oracle/oracle-database/21/refrn/ALL_SEQUENCES.html
Fixes #3138