Skip to content

Commit

Permalink
fix upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Jul 26, 2024
1 parent 5055d7f commit 5ef276d
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions alembic/versions/a4e8be715296_add_deleted_as_new_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,9 @@

def upgrade() -> None:
# Add the new status to the enum
op.alter_column(
"system_requests",
"status",
existing_type=old_status_enum,
type_=new_status_enum,
existing_nullable=False,
)
op.execute("ALTER TYPE status ADD VALUE 'deleted'")


def downgrade() -> None:
# Remove the new status from the enum
op.alter_column(
"system_requests",
"status",
existing_type=new_status_enum,
type_=old_status_enum,
existing_nullable=False,
)
op.execute("ALTER TYPE status DELETE VALUE 'deleted'")

0 comments on commit 5ef276d

Please sign in to comment.