"""evatest

Revision ID: a01d9fdfa741
Revises: 3c416bce3770
Create Date: 2024-12-25 13:40:47.142440

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a01d9fdfa741'
down_revision = '3c416bce3770'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_task_cmf_testcycle',
    sa.Column('id', sa.String(length=128), nullable=False),
    sa.Column('parent_id', sa.String(length=64), nullable=True),
    sa.Column('root_id', sa.String(length=64), nullable=True),
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('left_id', sa.String(length=64), nullable=True),
    sa.Column('right_id', sa.String(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.ForeignKeyConstraint(['left_id'], ['cmf_task.id'], ),
    sa.ForeignKeyConstraint(['right_id'], ['cmf_testcycle.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_task_cmf_testcycle_left_id'), 'cmf_task_cmf_testcycle', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_task_cmf_testcycle_parent_id'), 'cmf_task_cmf_testcycle', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_task_cmf_testcycle_right_id'), 'cmf_task_cmf_testcycle', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_task_cmf_testcycle_root_id'), 'cmf_task_cmf_testcycle', ['root_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_task_cmf_testcycle_root_id'), table_name='cmf_task_cmf_testcycle')
    op.drop_index(op.f('ix_cmf_task_cmf_testcycle_right_id'), table_name='cmf_task_cmf_testcycle')
    op.drop_index(op.f('ix_cmf_task_cmf_testcycle_parent_id'), table_name='cmf_task_cmf_testcycle')
    op.drop_index(op.f('ix_cmf_task_cmf_testcycle_left_id'), table_name='cmf_task_cmf_testcycle')
    op.drop_table('cmf_task_cmf_testcycle')
    # ### end Alembic commands ###
