🐛 fix(alembic): handle exception when altering column "user_id" in "flow" table to be nullable
🔥 chore(alembic): remove unnecessary code in downgrade function
This commit is contained in:
parent
665dae87e5
commit
af593684c0
1 changed files with 7 additions and 4 deletions
|
|
@ -34,9 +34,12 @@ def upgrade() -> None:
|
||||||
|
|
||||||
def downgrade() -> None:
|
def downgrade() -> None:
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table("flow", schema=None) as batch_op:
|
try:
|
||||||
batch_op.alter_column(
|
with op.batch_alter_table("flow", schema=None) as batch_op:
|
||||||
"user_id", existing_type=sa.CHAR(length=32), nullable=False
|
batch_op.alter_column(
|
||||||
)
|
"user_id", existing_type=sa.CHAR(length=32), nullable=False
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue