"""empty message

Revision ID: 7a06e74c9934
Revises: 48f60fd6c0b1
Create Date: 2026-03-11 14:56:04.883677

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '7a06e74c9934'
down_revision = '48f60fd6c0b1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_cmf_project_import_file_id', table_name='cmf_project_import')
    op.drop_index('ix_cmf_project_import_import_report_id', table_name='cmf_project_import')
    op.drop_index('ix_cmf_project_import_validation_report_id', table_name='cmf_project_import')
    op.drop_constraint('cmf_project_import_validation_report_id_fkey', 'cmf_project_import', type_='foreignkey')
    op.drop_constraint('cmf_project_import_file_id_fkey', 'cmf_project_import', type_='foreignkey')
    op.drop_constraint('cmf_project_import_import_report_id_fkey', 'cmf_project_import', type_='foreignkey')
    op.drop_column('cmf_project_import', 'file_id')
    op.drop_column('cmf_project_import', 'import_report_id')
    op.drop_column('cmf_project_import', 'validation_report_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_project_import', sa.Column('validation_report_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True))
    op.add_column('cmf_project_import', sa.Column('import_report_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True))
    op.add_column('cmf_project_import', sa.Column('file_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True))
    op.create_foreign_key('cmf_project_import_import_report_id_fkey', 'cmf_project_import', 'cmf_attachment', ['import_report_id'], ['id'])
    op.create_foreign_key('cmf_project_import_file_id_fkey', 'cmf_project_import', 'cmf_attachment', ['file_id'], ['id'])
    op.create_foreign_key('cmf_project_import_validation_report_id_fkey', 'cmf_project_import', 'cmf_attachment', ['validation_report_id'], ['id'])
    op.create_index('ix_cmf_project_import_validation_report_id', 'cmf_project_import', ['validation_report_id'], unique=False)
    op.create_index('ix_cmf_project_import_import_report_id', 'cmf_project_import', ['import_report_id'], unique=False)
    op.create_index('ix_cmf_project_import_file_id', 'cmf_project_import', ['file_id'], unique=False)
    op.alter_column('cmf_project_import', 'on_error',
               existing_type=sa.Boolean(),
               type_=sa.VARCHAR(length=32),
               nullable=True)
    # ### end Alembic commands ###
