-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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: alembic migration error msg trying to delete constraint on tables #11115
Conversation
…int on tables" This reverts commit 3a359b0.
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. I think this migration shows that we could do with some migration squashing for Superset 1.0, as there's obviously some divergence even between Postgres and MySQL.
Totally! |
if isinstance(bind.dialect, MySQLDialect): | ||
# index only exists in mysql db | ||
with op.get_context().autocommit_block(): | ||
op.add_constraint("table_name", "tables", type_="unique") |
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.
AttributeError: module 'alembic.op' has no attribute 'add_constraint'
I would say - let's pass on the downgrade. That constraint was never needed
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.
LG%nit
apache#11115) * fix: alembic migration fails by deleting non existent constraint on tables * Revert "fix: alembic migration fails by deleting non existent constraint on tables" This reverts commit 3a359b0. * mantain migration but just for MySQL and add downgrade procedure * skip the downgrade
SUMMARY
Alembic migration error msg on PG:
ADDITIONAL INFORMATION