"""empty message

Revision ID: 073719702e2e
Revises: 23ecd00cae18
Create Date: 2020-03-29 13:31:19.799319

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '073719702e2e'
down_revision = '23ecd00cae18'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('task_owners',
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('task_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['task_id'], ['tasks.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('user_id', 'task_id')
    )
    op.drop_table('tags')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tags',
    sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.Column('task_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.ForeignKeyConstraint(['task_id'], ['tasks.id'], name='tags_task_id_fkey'),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='tags_user_id_fkey'),
    sa.PrimaryKeyConstraint('user_id', 'task_id', name='tags_pkey')
    )
    op.drop_table('task_owners')
    # ### end Alembic commands ###
