"""empty message

Revision ID: 6b8399876bd7
Revises: 9519ddb43615
Create Date: 2019-09-26 09:07:57.565481

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '6b8399876bd7'
down_revision = '9519ddb43615'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('blog_article_likes')
    op.drop_table('tags_in_article')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tags_in_article',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('tag_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('article_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['article_id'], ['blog_article.id'], name='fk_tags_in_article_article_id_blog_article'),
    sa.ForeignKeyConstraint(['tag_id'], ['blog_tag.id'], name='fk_tags_in_article_tag_id_blog_tag'),
    sa.PrimaryKeyConstraint('id', name='pk_tags_in_article')
    )
    op.create_table('blog_article_likes',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('article_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['article_id'], ['blog_article.id'], name='fk_blog_article_likes_article_id_blog_article'),
    sa.ForeignKeyConstraint(['user_id'], ['blog_user.id'], name='fk_blog_article_likes_user_id_blog_user'),
    sa.PrimaryKeyConstraint('id', name='pk_blog_article_likes')
    )
    # ### end Alembic commands ###
