"""empty message

Revision ID: a3b92f94b557
Revises: bc4dff66578c
Create Date: 2020-04-21 19:21:10.710303

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a3b92f94b557'
down_revision = 'bc4dff66578c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('reaction',
    sa.Column('user_id', sa.String(length=40), nullable=False),
    sa.Column('article_id', sa.String(length=40), nullable=False),
    sa.Column('emotion', sa.Enum('IDEA', 'BUG', 'CLAP', 'LOVE', 'PARTY', 'WIZARD', name='emotions'), nullable=False),
    sa.Column('creation_date', sa.DateTime(timezone=True), nullable=False),
    sa.ForeignKeyConstraint(['article_id'], ['article.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('user_id', 'article_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('reaction')
    # ### end Alembic commands ###
