"""Add workflow run Revision ID: 2d6e2f41caa2 Revises: bee2a9fcc6a6 Create Date: 2025-04-11 17:02:58.461460 """ from typing import Sequence, Union import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision: str = "2d6e2f41caa2" down_revision: Union[str, None] = "bee2a9fcc6a6" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.create_table( "workflow_runs", sa.Column("id", sa.Integer(), nullable=False), sa.Column("name", sa.String(), nullable=False), sa.Column("workflow_id", sa.Integer(), nullable=False), sa.Column( "mode", sa.Enum("VOICE", "CHAT", name="workflow_run_mode"), nullable=False ), sa.Column("created_at", sa.DateTime(timezone=True), nullable=True), sa.ForeignKeyConstraint( ["workflow_id"], ["workflows.id"], ), sa.PrimaryKeyConstraint("id"), ) op.create_index(op.f("ix_workflow_runs_id"), "workflow_runs", ["id"], unique=False) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f("ix_workflow_runs_id"), table_name="workflow_runs") op.drop_table("workflow_runs") # ### end Alembic commands ###