"""evatest

Revision ID: f4ffd9ab3d78
Revises: 946654362f64
Create Date: 2024-12-09 13:24:50.008288

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'f4ffd9ab3d78'
down_revision = '946654362f64'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_testcase_run', sa.Column('status', sa.String(length=32), nullable=True))
    op.drop_index('ix_cmf_testcase_run_status_id', table_name='cmf_testcase_run')
    op.drop_constraint('cmf_testcase_run_status_id_fkey', 'cmf_testcase_run', type_='foreignkey')
    op.drop_column('cmf_testcase_run', 'status_id')
    op.add_column('cmf_testcycle_testcase_result', sa.Column('status', sa.String(length=32), nullable=True))
    op.drop_index('ix_cmf_testcycle_testcase_result_status_id', table_name='cmf_testcycle_testcase_result')
    op.drop_constraint('cmf_testcycle_testcase_result_status_id_fkey', 'cmf_testcycle_testcase_result', type_='foreignkey')
    op.drop_column('cmf_testcycle_testcase_result', 'status_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_testcycle_testcase_result', sa.Column('status_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True))
    op.create_foreign_key('cmf_testcycle_testcase_result_status_id_fkey', 'cmf_testcycle_testcase_result', 'cmf_status', ['status_id'], ['id'])
    op.create_index('ix_cmf_testcycle_testcase_result_status_id', 'cmf_testcycle_testcase_result', ['status_id'], unique=False)
    op.drop_column('cmf_testcycle_testcase_result', 'status')
    op.add_column('cmf_testcase_run', sa.Column('status_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True))
    op.create_foreign_key('cmf_testcase_run_status_id_fkey', 'cmf_testcase_run', 'cmf_status', ['status_id'], ['id'])
    op.create_index('ix_cmf_testcase_run_status_id', 'cmf_testcase_run', ['status_id'], unique=False)
    op.drop_column('cmf_testcase_run', 'status')
    # ### end Alembic commands ###
