"""Add workflow model Revision ID: 93a1ddbb6ffd Revises: Create Date: 2025-04-03 20:06:47.970117 """ from typing import Sequence, Union import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision: str = "93a1ddbb6ffd" down_revision: Union[str, None] = None 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( "workflows", sa.Column("id", sa.Integer(), nullable=False), sa.Column("name", sa.String(), nullable=False), sa.Column("workflow_definition", sa.JSON(), nullable=False), sa.Column("created_at", sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint("id"), ) op.create_index(op.f("ix_workflows_id"), "workflows", ["id"], unique=False) op.create_index(op.f("ix_workflows_name"), "workflows", ["name"], unique=False) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f("ix_workflows_name"), table_name="workflows") op.drop_index(op.f("ix_workflows_id"), table_name="workflows") op.drop_table("workflows") # ### end Alembic commands ###