"""Create RightSwipe table

Revision ID: a20aa1227f71
Revises: 00e55de048b9
Create Date: 2021-05-03 00:57:27.214098

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a20aa1227f71'
down_revision = '00e55de048b9'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('rightswipes',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('swiper', sa.Integer(), nullable=False),
    sa.Column('swipee', sa.Integer(), nullable=False),
    sa.Column('created_on', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
    sa.ForeignKeyConstraint(['swipee'], ['users.id'], ondelete='CASCADE'),
    sa.ForeignKeyConstraint(['swiper'], ['users.id'], ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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