"""Task code history

Revision ID: 084b0e58e656
Revises: a9f14ccee1d7
Create Date: 2023-03-31 15:46:08.051514

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '084b0e58e656'
down_revision = 'a9f14ccee1d7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_task_code_history', sa.Column('project_id', sa.String(length=64), nullable=False))
    op.create_index(op.f('ix_cmf_task_code_history_project_id'), 'cmf_task_code_history', ['project_id'], unique=False)
    op.create_foreign_key(None, 'cmf_task_code_history', 'cmf_project', ['project_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'cmf_task_code_history', type_='foreignkey')
    op.drop_index(op.f('ix_cmf_task_code_history_project_id'), table_name='cmf_task_code_history')
    op.drop_column('cmf_task_code_history', 'project_id')
    # ### end Alembic commands ###
