-
Notifications
You must be signed in to change notification settings - Fork 409
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
Alter alias even from ref propagation #6956
Conversation
aljazerzen
commented
Mar 1, 2024
- uncomment the hack
- make commands produced by affected refs execute as causes instead of innards
- fix for reflection writer when we create a type and drop it in the same migration
@msullivan Yesterday, we changed affected refs to be applied as "caused" instead of "innards". You said that you are scared what this will break. I think we have exactly one test that breaks:
The alter produces the following delta root:
... which fails in postgres, because we try to drop the column while constraint still refers to it. Solution that I'm seeing is to move the "column drop" to the end of the "alter property" command. |
The remaining error is this:
We have an "alter property removed", which propagates via two paths:
This fails because the property |
129a3c0
to
a4096ae
Compare
…s is not strictly needed)
This reverts commit 0d169d1a226bc2253416461cf53818e5ade10460.
f4a5256
to
7e35c1d
Compare
f6691a6
to
46d45ed
Compare
|
||
for descendant_name in descendant_names: | ||
descendant = schema.get(descendant_name, type=so.InheritingObject) | ||
assert descendant, '.inherit_fields caused a drop of a descendant?' |
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.
get
will raise an error by itself, right?
If you want it deferred to this assert, pass a default
edb/schema/expraliases.py
Outdated
@@ -426,7 +421,6 @@ def _alter_begin( | |||
|
|||
return super()._alter_begin(schema, context) | |||
|
|||
|
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 need to enable ruff's prefix whitespace linting!