"""Changing Worker field idle_callback to permanent

Revision ID: 740850a52979
Revises: c225e89357b9
Create Date: 2024-03-17 22:43:20.712985

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '740850a52979'
down_revision = 'c225e89357b9'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('worker', schema=None) as batch_op:
        batch_op.add_column(sa.Column('permanent', sa.Boolean(), server_default="1"))
        batch_op.drop_column('idle_callback')

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('worker', schema=None) as batch_op:
        batch_op.add_column(sa.Column('idle_callback', sa.VARCHAR(), nullable=True))
        batch_op.drop_column('permanent')

    # ### end Alembic commands ###
