"""empty message

Revision ID: 3d817a9a85e6
Revises: acddac009dc8
Create Date: 2021-10-03 17:09:49.507376

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '3d817a9a85e6'
down_revision = 'acddac009dc8'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('product',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('isbn', sa.String(), nullable=True),
    sa.Column('title', sa.String(), nullable=False),
    sa.Column('author', sa.String(), nullable=False),
    sa.Column('publisher', sa.String(), nullable=False),
    sa.Column('msrp', sa.Integer(), nullable=False),
    sa.Column('price', sa.Integer(), nullable=False),
    sa.Column('genre', sa.String(), nullable=False),
    sa.Column('popularity', sa.Integer(), default=0),
    sa.Column('published', sa.Date(), nullable=True),
    sa.Column('created', sa.Date(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('id'),
    sa.UniqueConstraint('isbn')
    )
    op.create_unique_constraint(None, 'customer', ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'customer', type_='unique')
    op.drop_table('product')
    # ### end Alembic commands ###
