"""Added order

Revision ID: 2e9aaef8224f
Revises: 5c5ecac14904
Create Date: 2020-03-24 15:49:22.631245

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2e9aaef8224f'
down_revision = '5c5ecac14904'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Order',
    sa.Column('session_id', sa.String(length=255), nullable=False),
    sa.Column('product_id', sa.String(length=255), nullable=True),
    sa.ForeignKeyConstraint(['product_id'], ['products.product_id'], ),
    sa.ForeignKeyConstraint(['session_id'], ['sessions.profile_id'], ),
    sa.PrimaryKeyConstraint('session_id')
    )
    # ### end Alembic commands ###


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