-
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
Fix addAutoIncrement startValue and incrementBy support on postgresql #2588
Conversation
- Added missing defaultOnNull and generationType attributes to addAutoIncrement
Code review and test results: Things to be aware of
Things to worry about
|
@nvoxland this is in ready to merge, but no reviewers requested. Can you please add whomever should review? Thanks! |
Not sure why it was in ready to merge. It should be ready for test now, though. |
Note: This fix changes the XSD. |
@nvoxland, I'm moving this one back to development as the test-harness PR is not approved (changes requested). |
@KushnirykOleh fixed up the test harness tests |
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.
- Fix adds support for two additional attributes on sequences.
- Impacts Postgres, EDB Postgres and CockroachDB.
- Test harness extended to validate START WITH and INCREMENT BY for Postgres and EDB.
- Net-new test CockroachDB harness cases added for all sequence-related Liquibase changeTypes.
- No further testing necessary.
APPROVED
Description
This handles two issues related to the addAutoIncrement tag
Postgresql not respecting startValue and incrementBy
A changelog like:
doesn't include the incrementBy or startWith attributes when creating the sequence in postgresql.
4.0+ XSDs doesn't allow defaultOnNull or generationType on addAutoIncrement
These attributes were added in 3.6 for oracle, but not really added to the XSD. They happened to work because there was a problem in the XSD that allowed any attribute in addAutoIncrement, and when we fixed that in 4.0 these attributes stopped working.
This PR adds the two attributes back so they can be used again.
NOTE: It does NOT change the behavior where they are ignored for databases other than oracle, rather than throwing a validation exception. We ignore the behavior since it's oracle-specific functionality and so to preserve cross-database compatibility we don't fail the changelog validation.
Test Harness test: liquibase/liquibase-test-harness#213