"""issue picker fields

Revision ID: 863ed9a4fabd
Revises: a310e6260b8e
Create Date: 2026-02-12 11:49:13.447646

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '863ed9a4fabd'
down_revision = 'a310e6260b8e'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_cust_field', sa.Column('filter_cur_project', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_cust_field', sa.Column('allow_multichoice', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_cust_field', sa.Column('task_create_relation', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_cust_field', sa.Column('task_remove_relation', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_cust_field', sa.Column('task_relation_type_id', sa.String(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_cust_field_task_relation_type_id'), 'cmf_cust_field', ['task_relation_type_id'], unique=False)
    op.create_foreign_key(None, 'cmf_cust_field', 'cmf_relation_type', ['task_relation_type_id'], ['id'])
    op.add_column('cmf_cust_field_conf_field', sa.Column('filter_cur_project', sa.Boolean(), nullable=False, server_default='false'))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('cmf_cust_field_conf_field', 'filter_cur_project')
    op.drop_constraint(None, 'cmf_cust_field', type_='foreignkey')
    op.drop_index(op.f('ix_cmf_cust_field_task_relation_type_id'), table_name='cmf_cust_field')
    op.drop_column('cmf_cust_field', 'task_relation_type_id')
    op.drop_column('cmf_cust_field', 'task_remove_relation')
    op.drop_column('cmf_cust_field', 'task_create_relation')
    op.drop_column('cmf_cust_field', 'allow_multichoice')
    op.drop_column('cmf_cust_field', 'filter_cur_project')
    # ### end Alembic commands ###
