"""rename the filed script to script_old on the table run

Revision ID: 2fa41efc56f0
Revises: 5a08750d6760
Create Date: 2024-01-29 14:12:56.054544

"""
from alembic import op


# revision identifiers, used by Alembic.
revision = '2fa41efc56f0'
down_revision = '5a08750d6760'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute('PRAGMA foreign_keys=OFF;')
    with op.batch_alter_table('run', schema=None) as batch_op:
        batch_op.alter_column('script', new_column_name='script_old')
    op.execute('PRAGMA foreign_keys=ON;')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute('PRAGMA foreign_keys=OFF;')
    with op.batch_alter_table('run', schema=None) as batch_op:
        batch_op.alter_column('script_old', new_column_name='script')
    op.execute('PRAGMA foreign_keys=ON;')
    # ### end Alembic commands ###
