"""empty message

Revision ID: ae214f09bf0c
Revises: 16f03f1b1ff9
Create Date: 2021-09-30 17:42:18.727165

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ae214f09bf0c'
down_revision = '16f03f1b1ff9'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('category')
    op.drop_constraint(None, 'product', type_='foreignkey')
    op.drop_column('product', 'category')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('product', sa.Column('category', sa.INTEGER(), nullable=True))
    op.create_foreign_key(None, 'product', 'category', ['category'], ['id'])
    op.create_table('category',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('title', sa.VARCHAR(length=80), nullable=False),
    sa.Column('short_description', sa.VARCHAR(length=120), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###
