"""cmf_shadow_lin

Revision ID: b16d2184902e
Revises: 385af720ae83
Create Date: 2022-04-01 14:15:22.730904

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b16d2184902e'
down_revision = '385af720ae83'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_shadow_link',
    sa.Column('id', sa.String(length=64), nullable=False),
    sa.Column('place', sa.String(length=64), nullable=True),
    sa.Column('pinned', sa.Boolean(), nullable=True),
    sa.Column('task_id', sa.String(length=64), nullable=True),
    sa.Column('person_id', sa.String(length=64), nullable=True),
    sa.ForeignKeyConstraint(['person_id'], ['cmf_person.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['cmf_task.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_shadow_link_person_id'), 'cmf_shadow_link', ['person_id'], unique=False)
    op.create_index(op.f('ix_cmf_shadow_link_place'), 'cmf_shadow_link', ['place'], unique=False)
    op.create_index(op.f('ix_cmf_shadow_link_task_id'), 'cmf_shadow_link', ['task_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_shadow_link_task_id'), table_name='cmf_shadow_link')
    op.drop_index(op.f('ix_cmf_shadow_link_place'), table_name='cmf_shadow_link')
    op.drop_index(op.f('ix_cmf_shadow_link_person_id'), table_name='cmf_shadow_link')
    op.drop_table('cmf_shadow_link')
    # ### end Alembic commands ###
