temp commit
This commit is contained in:
parent
8760f27b51
commit
0e9e49df16
193 changed files with 23228 additions and 935 deletions
31
alembic/versions/20260224_0019_add_resolving_to_runstatus.py
Normal file
31
alembic/versions/20260224_0019_add_resolving_to_runstatus.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"""Add resolving to RunStatus enum
|
||||
|
||||
Revision ID: 20260224_0019
|
||||
Revises: 20260224_0018
|
||||
Create Date: 2026-02-24 22:20:00.000000
|
||||
|
||||
"""
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '20260224_0019'
|
||||
down_revision: str | Sequence[str] | None = '20260224_0018'
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# Use COMMIT to break out of the transaction block that Alembic creates in env.py.
|
||||
# Postgres restricts ALTER TYPE ... ADD VALUE inside transactions when the type is in use.
|
||||
# This is the robust, non-patchwork way to ensure the schema evolves correctly.
|
||||
op.execute("COMMIT")
|
||||
op.execute("ALTER TYPE run_status ADD VALUE IF NOT EXISTS 'resolving' AFTER 'running'")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# Enum values cannot be easily removed in Postgres without recreating the type,
|
||||
# which is risky and usually avoided in simple migrations.
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue