"""comment_closed_by

Revision ID: 8e88adb822c7
Revises: 9be27c2415a3
Create Date: 2023-08-09 14:06:59.221926

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8e88adb822c7'
down_revision = '9be27c2415a3'
branch_labels = None
depends_on = None


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


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