From 51d2fd9d0a4d01d987851b58ca9344b52699cbfd Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 28 Mar 2026 01:17:00 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20migration=200031=20no-op=20=E2=80=94=20s?= =?UTF-8?q?tatus=20column=20is=20TEXT=20not=20a=20PG=20enum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alembic/versions/0031_add_cancelled_task_status.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/alembic/versions/0031_add_cancelled_task_status.py b/alembic/versions/0031_add_cancelled_task_status.py index 7194f02..d7fe198 100644 --- a/alembic/versions/0031_add_cancelled_task_status.py +++ b/alembic/versions/0031_add_cancelled_task_status.py @@ -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