| 123456789101112131415161718192021222324252627 |
- """Pin the Task 4 physical-plan lifecycle to compiled-only creation."""
- from alembic import op
- revision = "20260723_130"
- down_revision = "20260723_120"
- branch_labels = None
- depends_on = None
- def upgrade() -> None:
- op.execute(
- """
- ALTER TABLE public.rule_execution_plans
- DROP CONSTRAINT rule_execution_plans_status_check;
- ALTER TABLE public.rule_execution_plans
- ADD CONSTRAINT rule_execution_plans_status_check
- CHECK (status IN ('compiled','published','revoked'));
- """
- )
- def downgrade() -> None:
- raise RuntimeError(
- "bound plan status migration is forward-only and cannot downgrade "
- "without rewriting persisted compiled plans"
- )
|