ruff check
This commit is contained in:
@@ -38,7 +38,7 @@ def upgrade():
|
||||
if constraint_name:
|
||||
try:
|
||||
batch_op.drop_constraint(constraint_name, type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
|
||||
batch_op.create_foreign_key(
|
||||
@@ -51,7 +51,7 @@ def downgrade():
|
||||
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
||||
try:
|
||||
batch_op.drop_constraint("fk_tasks_user_id_users", type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
|
||||
batch_op.create_foreign_key(
|
||||
|
||||
@@ -33,7 +33,7 @@ def upgrade():
|
||||
if "user_id" in fk["constrained_columns"]:
|
||||
try:
|
||||
batch_op.drop_constraint(fk["name"], type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
|
||||
batch_op.create_foreign_key(
|
||||
@@ -46,7 +46,7 @@ def downgrade():
|
||||
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
||||
try:
|
||||
batch_op.drop_constraint("fk_tasks_user_id_users", type_="foreignkey")
|
||||
except:
|
||||
except: # noqa E722
|
||||
pass
|
||||
batch_op.create_foreign_key(
|
||||
"fk_tasks_user_id_users", "users", ["user_id"], ["id"]
|
||||
|
||||
Reference in New Issue
Block a user