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
CORE-931: addColumn should support not-null constraint with an initia… #928
Conversation
Hi @RG9 ! Thanks for your pull request! Here’s what happens next: A member of the Liquibase team will take a look at your contribution and may suggest We’ll let you know when it’s ready to move to the next step or if any changes are needed. -Ronak |
Labeled Risk Low because unit tests added. Moving to Conditioning internally. |
@RG9 I'm going to update your fork with the latest changes from liquibase/master and resolve the merge conflict. |
➤ Steven Massaro commented: Surya Aki Erzsebet Carmean Nathan Voxland This change looks to be dev complete to me. It is ready for QA sizing. |
The creation of the databasechangeloglock table was not threadsafe. If the creation of the table failed, Liquibase would exit. This change introduces a retry loop with a random wait between failed iterations so that multiple instances of Liquibase can be run concurrently on a fresh database.
Correctly default strict setting and use global configuration DAT-8547
Liquibase generates invalid SQL on addColumn changesets specified with a not-nullable column. The bug manifests when update is executed against a table that is populated with data. Bug is reproducible in 4.6.0.
Steps to Reproduce
Dev Notes
nvoxland this pull request should resolve JIRA ticket https://liquibase.jira.com/browse/CORE-931
Test Requirements (Internal Liquibase QA)
This test requires a Postgres instance; version does not matter. The test-harness will execute the test against the following versions:
9, 9.5, 10, 11, 12, 13
. The attached changelog includes a changeset that replicates the bug as well as a changeset that was the workaround to the bug prior to the fix; we want to make sure both versions of adding a not-nullable constraint both work after the fix.Manual Tests
Verify liquibase update
sql generates valid SQL for an addColumn with a notnullable constraint.liquibase update-sql --changelog-file lb45-changelog.xml
ALTER TABLE lb45 ALTER COLUMN "columnWithInitialValue" SET NOT NULL;
ALTER TABLE lb45 ALTER COLUMN "columnWithConstraintInSeparateChange" SET NOT NULL;
Verify update is successful for adding a column with a not-nullable constraint on a populated table.
liquibase update --changelog-file lb45-changelog.xml
Automated Tests
┆Issue is synchronized with this Jira Bug by Unito