"""Add timeout to tasks

Revision ID: c225e89357b9
Revises: 00ca4479c7e1
Create Date: 2024-01-25 10:25:55.535129

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'c225e89357b9'
down_revision = '00ca4479c7e1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('task', schema=None) as batch_op:
        batch_op.add_column(sa.Column('status_date', sa.DateTime(), nullable=True))
        batch_op.add_column(sa.Column('download_timeout', sa.Integer(), nullable=True))
        batch_op.add_column(sa.Column('run_timeout', sa.Integer(), nullable=True))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('task', schema=None) as batch_op:
        batch_op.drop_column('run_timeout')
        batch_op.drop_column('download_timeout')
        batch_op.drop_column('status_date')

    # ### end Alembic commands ###
