-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fixes #23837: Enforce change request and workflow table schema #5233
Fixes #23837: Enforce change request and workflow table schema #5233
Conversation
PR updated with a new commit |
PR updated with a new commit |
PR updated with a new commit |
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.
Looks OK once feedback are addressed, I still need to test it on real data
select count(*) | ||
from information_schema.columns | ||
where table_name = $tableName | ||
and column_name = $columnName |
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.
]we have a convention of always using . ${Var}
for interpolation
where table_name = $tableName | ||
and column_name = $columnName | ||
and is_nullable = 'YES' | ||
""".query[Int].unique.map(_ > 0) |
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.
This method has been written several times.
Shouldn't it be time to put it in a DbCommonMigration
or something?
PR updated with a new commit |
1 similar comment
PR updated with a new commit |
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.
LGTM
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
80b3009
to
a900c33
Compare
https://issues.rudder.io/issues/23837
We need to add
NOT NULL
constraint to the change-validation plugin tables, in order to enforce the table schema (until now there does not seem to be anull
value that has been written in the table, in that case the migration would fail but the user would have a nice error log). I added database tests.Note that this PR is very similar to #5232