fix: migration 0031 no-op — status column is TEXT not a PG enum
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
"""Add 'cancelled' value to task_status enum."""
|
||||
"""Add 'cancelled' task status.
|
||||
|
||||
The status column is plain TEXT (not a PostgreSQL enum type), so no DDL
|
||||
change is required — the application layer already accepts the new value.
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
|
||||
@@ -9,10 +13,9 @@ depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute("ALTER TYPE task_status ADD VALUE IF NOT EXISTS 'cancelled'")
|
||||
# No-op: status is stored as TEXT; the new value is valid without DDL changes.
|
||||
pass
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# PostgreSQL does not support removing enum values without a full type rebuild.
|
||||
# Downgrade is a no-op; the value simply becomes unused.
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user