Skip to content

Commit 5ef276d

Browse files
fix upgrade
1 parent 5055d7f commit 5ef276d

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

alembic/versions/a4e8be715296_add_deleted_as_new_status.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,9 @@
4141

4242
def upgrade() -> None:
4343
# Add the new status to the enum
44-
op.alter_column(
45-
"system_requests",
46-
"status",
47-
existing_type=old_status_enum,
48-
type_=new_status_enum,
49-
existing_nullable=False,
50-
)
44+
op.execute("ALTER TYPE status ADD VALUE 'deleted'")
5145

5246

5347
def downgrade() -> None:
5448
# Remove the new status from the enum
55-
op.alter_column(
56-
"system_requests",
57-
"status",
58-
existing_type=new_status_enum,
59-
type_=old_status_enum,
60-
existing_nullable=False,
61-
)
49+
op.execute("ALTER TYPE status DELETE VALUE 'deleted'")

0 commit comments

Comments
 (0)