feat: add duplicate-safe workflow shadow dispatch

This commit is contained in:
2026-04-07 11:35:32 +02:00
parent 26046fb2d6
commit f43f1e7420
11 changed files with 496 additions and 113 deletions
@@ -0,0 +1,36 @@
"""Add execution_mode to workflow_runs.
Revision ID: 064
Revises: 063
"""
from alembic import op
import sqlalchemy as sa
revision = "064"
down_revision = "063"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column(
"workflow_runs",
sa.Column(
"execution_mode",
sa.String(length=20),
nullable=False,
server_default="legacy",
),
)
op.execute(
"""
UPDATE workflow_runs
SET execution_mode = 'legacy'
WHERE execution_mode IS NULL OR execution_mode = ''
"""
)
op.alter_column("workflow_runs", "execution_mode", server_default=None)
def downgrade() -> None:
op.drop_column("workflow_runs", "execution_mode")