"""Add Task.args_schema and Task.args_schema_version

Revision ID: 4c308bcaea2b
Revises: 50a13d6138fd
Create Date: 2023-05-29 17:09:02.492639

"""
import sqlalchemy as sa
import sqlmodel
from alembic import op


# revision identifiers, used by Alembic.
revision = "4c308bcaea2b"
down_revision = "50a13d6138fd"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("task", sa.Column("args_schema", sa.JSON(), nullable=True))
    op.add_column(
        "task",
        sa.Column(
            "args_schema_version",
            sqlmodel.sql.sqltypes.AutoString(),
            nullable=True,
        ),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("task", "args_schema_version")
    op.drop_column("task", "args_schema")
    # ### end Alembic commands ###
