"""Add run_once_start_time to Schedule [1d74e596abb8].

Revision ID: 1d74e596abb8
Revises: 0.56.2
Create Date: 2024-04-02 11:35:28.755331

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "1d74e596abb8"
down_revision = "0.56.2"
branch_labels = None
depends_on = None


def upgrade() -> None:
    """Upgrade database schema and/or data, creating a new revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("schedule", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column("run_once_start_time", sa.DateTime(), nullable=True)
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade database schema and/or data back to the previous revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("schedule", schema=None) as batch_op:
        batch_op.drop_column("run_once_start_time")

    # ### end Alembic commands ###
