"""add ft_components

Revision ID: 30e6d73ae197
Revises: 17f3c9f72521
Create Date: 2023-08-23 15:24:56.923783

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '30e6d73ae197'
down_revision = '17f3c9f72521'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_task_filter_ft_components',
    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.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_task_filter_ft_components_left_id'), 'cmf_task_filter_ft_components', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_task_filter_ft_components_parent_id'), 'cmf_task_filter_ft_components', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_task_filter_ft_components_right_id'), 'cmf_task_filter_ft_components', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_task_filter_ft_components_root_id'), 'cmf_task_filter_ft_components', ['root_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_task_filter_ft_components_root_id'), table_name='cmf_task_filter_ft_components')
    op.drop_index(op.f('ix_cmf_task_filter_ft_components_right_id'), table_name='cmf_task_filter_ft_components')
    op.drop_index(op.f('ix_cmf_task_filter_ft_components_parent_id'), table_name='cmf_task_filter_ft_components')
    op.drop_index(op.f('ix_cmf_task_filter_ft_components_left_id'), table_name='cmf_task_filter_ft_components')
    op.drop_table('cmf_task_filter_ft_components')
    # ### end Alembic commands ###
