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

AddColumnChange with schema and NOT NULL constraint fails #2780

Closed
MartinRied opened this issue Apr 21, 2022 · 0 comments · Fixed by #2781
Closed

AddColumnChange with schema and NOT NULL constraint fails #2780

MartinRied opened this issue Apr 21, 2022 · 0 comments · Fixed by #2781

Comments

@MartinRied
Copy link
Contributor

With commit 3f62f95 the AddColumnChange was modified to not include NOT NULL constraints in the initial ALTER TABLE ... ADD statement but instead use an "embedded" AlterColumnChange to generate an ALTER TABLE ... ALTER COLUMN statement to be executed separately.

However when creating that AlterColumnChange, the schema property from the original AddColumnChange is not copied over to the new AlterColumnChange which means that when using a non-default schema the ALTER TABLE ... ALTER COLUMN targets the wrong schema.

@kataggart kataggart linked a pull request Apr 21, 2022 that will close this issue
8 tasks
@kataggart kataggart added this to To Do in Conditioning++ via automation Apr 21, 2022
Conditioning++ automation moved this from To Do to Done May 31, 2022
nvoxland added a commit that referenced this issue May 31, 2022
…2781)

- Update AddColumnChange Test to include Schema
- Update the AddColumnChange test case to include a non-default schema & catalog, covering those two fields of the AddColumnChange.
- Copy additional fields to AddNotNullConstraintChange in AddColumnChange
- The original implementation delegating the creation of a NOT NULL constraint within the AddColumnChange to the AddNotNullConstraintChange was flawed in that it ignored some properties present both in the ConstraintsConfig and in the AddNotNullConstraintChange.
- Exclude the "catalog" property from the AddColumnGeneratorTest since I'm not quite certain of the expected outcome.

Co-authored-by: Nathan Voxland <nathan@voxland.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants