"""empty message

Revision ID: 9cb6b5260dda
Revises: aa385991a796
Create Date: 2021-02-26 10:25:01.729979

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '9cb6b5260dda'
down_revision = 'aa385991a796'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('cart_option_id_fkey', 'cart', type_='foreignkey')
    op.drop_column('cart', 'option_id')
    op.drop_constraint('option_id_key', 'option', type_='unique')
    op.drop_constraint('order_data_option_id_fkey', 'order_data', type_='foreignkey')
    op.drop_column('order_data', 'option_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('order_data', sa.Column('option_id', postgresql.UUID(), autoincrement=False, nullable=True))
    op.create_foreign_key('order_data_option_id_fkey', 'order_data', 'option', ['option_id'], ['id'])
    op.create_unique_constraint('option_id_key', 'option', ['id'])
    op.add_column('cart', sa.Column('option_id', postgresql.UUID(), autoincrement=False, nullable=True))
    op.create_foreign_key('cart_option_id_fkey', 'cart', 'option', ['option_id'], ['id'])
    # ### end Alembic commands ###
