"""Add reaction table

Revision ID: 1a1ea46dc3e1
Revises: 26341fb32054
Create Date: 2019-08-03 00:40:21.380240

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '1a1ea46dc3e1'
down_revision = '26341fb32054'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('reaction',
    sa.Column('mxid', sa.String(length=255), nullable=False),
    sa.Column('mx_room', sa.String(length=255), nullable=False),
    sa.Column('fb_msgid', sa.String(length=127), nullable=False),
    sa.Column('fb_receiver', sa.String(length=127), nullable=False),
    sa.Column('fb_sender', sa.String(length=127), nullable=False),
    sa.Column('reaction', sa.String(length=1), nullable=False),
    sa.PrimaryKeyConstraint('fb_msgid', 'fb_receiver', 'fb_sender'),
    sa.UniqueConstraint('mxid', 'mx_room', name='_mx_react_id_room')
    )
    # ### end Alembic commands ###


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