mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(migration): Catch DatabaseError to avoid migration crash with MySQL 8.0 (#21679)
This commit is contained in:
@@ -39,7 +39,7 @@ def upgrade():
|
||||
new_column_name="allow_file_upload",
|
||||
existing_type=sa.Boolean(),
|
||||
)
|
||||
except sa.exc.OperationalError:
|
||||
except (sa.exc.OperationalError, sa.exc.DatabaseError):
|
||||
# In MySQL 8.0 renaming the column rename fails because it has
|
||||
# a constraint check; we can safely remove it in that case, see
|
||||
# https://github.com/sqlalchemy/alembic/issues/699
|
||||
|
||||
Reference in New Issue
Block a user