"""empty message

Revision ID: 74033e15d812
Revises: f22222a0efa3
Create Date: 2021-03-28 20:22:10.354166

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '74033e15d812'
down_revision = 'f22222a0efa3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('user_role',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=50), nullable=True),
    sa.Column('create', sa.Boolean(), nullable=True),
    sa.Column('delete', sa.Boolean(), nullable=True),
    sa.Column('modify', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_unique_constraint(None, 'product', ['id'])
    op.add_column('user', sa.Column('role_id', sa.Integer(), nullable=True))
    op.create_unique_constraint(None, 'user', ['id'])
    # ### end Alembic commands ###


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