Fixed a migration issue for the external database. #4728

This commit is contained in:
Akshay Joshi 2023-01-31 15:53:16 +05:30
parent ff4a409e27
commit 103cf0eba5

View File

@ -68,11 +68,12 @@ def migrate_connection_params(table_name):
)
# Drop constraint on ssl_mode column.
try:
with op.batch_alter_table(table_name) as batch_op:
batch_op.drop_constraint('ck_ssl_mode')
except Exception:
pass
if table_name == 'server':
try:
with op.batch_alter_table(table_name) as batch_op:
batch_op.drop_constraint('ck_ssl_mode')
except Exception:
pass
# Drop unused columns
with op.batch_alter_table(table_name) as batch_op: