"""fix

Revision ID: a908388e1518
Revises: 75f4578e2ff9
Create Date: 2025-05-20 16:12:20.239053

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a908388e1518'
down_revision = '75f4578e2ff9'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('ix_cmf_achievement_code_gin_trgm', 'cmf_achievement', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_achievement_name_gin_trgm', 'cmf_achievement', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_backbone_instance_code_gin_trgm', 'cmf_backbone_instance', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_backbone_instance_name_gin_trgm', 'cmf_backbone_instance', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_backbone_peer_code_gin_trgm', 'cmf_backbone_peer', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_backbone_peer_name_gin_trgm', 'cmf_backbone_peer', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_checklist_template_code_gin_trgm', 'cmf_checklist_template', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_checklist_template_name_gin_trgm', 'cmf_checklist_template', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_checklist_template_item_code_gin_trgm', 'cmf_checklist_template_item', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_checklist_template_item_name_gin_trgm', 'cmf_checklist_template_item', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_course_code_gin_trgm', 'cmf_course', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_course_name_gin_trgm', 'cmf_course', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_desk_code_gin_trgm', 'cmf_desk', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_desk_name_gin_trgm', 'cmf_desk', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_branch_code_gin_trgm', 'cmf_evagit_branch', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_commit_code_gin_trgm', 'cmf_evagit_commit', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_group_code_gin_trgm', 'cmf_evagit_group', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_merge_request_code_gin_trgm', 'cmf_evagit_merge_request', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_repo_code_gin_trgm', 'cmf_evagit_repo', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_role_code_gin_trgm', 'cmf_evagit_role', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_role_name_gin_trgm', 'cmf_evagit_role', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_role_assign_code_gin_trgm', 'cmf_evagit_role_assign', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_evagit_role_assign_name_gin_trgm', 'cmf_evagit_role_assign', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_exam_code_gin_trgm', 'cmf_exam', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_exam_name_gin_trgm', 'cmf_exam', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_exam_question_folder_code_gin_trgm', 'cmf_exam_question_folder', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_exam_question_folder_name_gin_trgm', 'cmf_exam_question_folder', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_question_code_gin_trgm', 'cmf_question', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_question_name_gin_trgm', 'cmf_question', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_question_folder_code_gin_trgm', 'cmf_question_folder', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_question_folder_name_gin_trgm', 'cmf_question_folder', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_report_code_gin_trgm', 'cmf_report', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_report_name_gin_trgm', 'cmf_report', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.create_index('ix_cmf_ssh_key_code_gin_trgm', 'cmf_ssh_key', ['code'], unique=False, postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.create_index('ix_cmf_ssh_key_name_gin_trgm', 'cmf_ssh_key', ['name'], unique=False, postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_cmf_ssh_key_name_gin_trgm', table_name='cmf_ssh_key', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_ssh_key_code_gin_trgm', table_name='cmf_ssh_key', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_report_name_gin_trgm', table_name='cmf_report', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_report_code_gin_trgm', table_name='cmf_report', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_question_folder_name_gin_trgm', table_name='cmf_question_folder', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_question_folder_code_gin_trgm', table_name='cmf_question_folder', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_question_name_gin_trgm', table_name='cmf_question', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_question_code_gin_trgm', table_name='cmf_question', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_exam_question_folder_name_gin_trgm', table_name='cmf_exam_question_folder', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_exam_question_folder_code_gin_trgm', table_name='cmf_exam_question_folder', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_exam_name_gin_trgm', table_name='cmf_exam', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_exam_code_gin_trgm', table_name='cmf_exam', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_role_assign_name_gin_trgm', table_name='cmf_evagit_role_assign', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_role_assign_code_gin_trgm', table_name='cmf_evagit_role_assign', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_role_name_gin_trgm', table_name='cmf_evagit_role', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_role_code_gin_trgm', table_name='cmf_evagit_role', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_repo_code_gin_trgm', table_name='cmf_evagit_repo', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_merge_request_code_gin_trgm', table_name='cmf_evagit_merge_request', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_group_code_gin_trgm', table_name='cmf_evagit_group', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_commit_code_gin_trgm', table_name='cmf_evagit_commit', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_evagit_branch_code_gin_trgm', table_name='cmf_evagit_branch', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_desk_name_gin_trgm', table_name='cmf_desk', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_desk_code_gin_trgm', table_name='cmf_desk', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_course_name_gin_trgm', table_name='cmf_course', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_course_code_gin_trgm', table_name='cmf_course', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_checklist_template_item_name_gin_trgm', table_name='cmf_checklist_template_item', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_checklist_template_item_code_gin_trgm', table_name='cmf_checklist_template_item', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_checklist_template_name_gin_trgm', table_name='cmf_checklist_template', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_checklist_template_code_gin_trgm', table_name='cmf_checklist_template', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_backbone_peer_name_gin_trgm', table_name='cmf_backbone_peer', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_backbone_peer_code_gin_trgm', table_name='cmf_backbone_peer', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_backbone_instance_name_gin_trgm', table_name='cmf_backbone_instance', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_backbone_instance_code_gin_trgm', table_name='cmf_backbone_instance', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_achievement_name_gin_trgm', table_name='cmf_achievement', postgresql_using='gin', postgresql_ops={'name': 'gin_trgm_ops'})
    op.drop_index('ix_cmf_achievement_code_gin_trgm', table_name='cmf_achievement', postgresql_using='gin', postgresql_ops={'code': 'gin_trgm_ops'})
    # ### end Alembic commands ###
