"""cust_field

Revision ID: 906eec711d7a
Revises: 7f252b710c38
Create Date: 2024-05-21 10:47:31.661327

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '906eec711d7a'
down_revision = '7f252b710c38'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_cust_field_conf_scheme_rule_parent_logic_types',
    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_cust_field_conf_scheme_rule_parent_logic_types_left_id'), 'cmf_cust_field_conf_scheme_rule_parent_logic_types', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_parent_id'), 'cmf_cust_field_conf_scheme_rule_parent_logic_types', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_right_id'), 'cmf_cust_field_conf_scheme_rule_parent_logic_types', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_root_id'), 'cmf_cust_field_conf_scheme_rule_parent_logic_types', ['root_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_root_id'), table_name='cmf_cust_field_conf_scheme_rule_parent_logic_types')
    op.drop_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_right_id'), table_name='cmf_cust_field_conf_scheme_rule_parent_logic_types')
    op.drop_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_parent_id'), table_name='cmf_cust_field_conf_scheme_rule_parent_logic_types')
    op.drop_index(op.f('ix_cmf_cust_field_conf_scheme_rule_parent_logic_types_left_id'), table_name='cmf_cust_field_conf_scheme_rule_parent_logic_types')
    op.drop_table('cmf_cust_field_conf_scheme_rule_parent_logic_types')
    # ### end Alembic commands ###
