"""empty message

Revision ID: 34f4b6da9abb
Revises: 3d817a9a85e6
Create Date: 2021-10-12 18:17:46.899154

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('staff',
    sa.Column('username', sa.String(), nullable=False),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('password', sa.String(), nullable=False),
    sa.Column('is_admin', sa.Boolean(), nullable=True),
    sa.Column('joined', sa.Date(), nullable=True),
    sa.PrimaryKeyConstraint('username'),
    sa.UniqueConstraint('username')
    )
    op.alter_column('address', 'office',
               existing_type=sa.BOOLEAN(),
               nullable=True)
    op.alter_column('address', 'default',
               existing_type=sa.BOOLEAN(),
               nullable=True)
    op.create_unique_constraint(None, 'address', ['id'])
    op.create_unique_constraint(None, 'product', ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'product', type_='unique')
    op.drop_constraint(None, 'address', type_='unique')
    op.alter_column('address', 'default',
               existing_type=sa.BOOLEAN(),
               nullable=False)
    op.alter_column('address', 'office',
               existing_type=sa.BOOLEAN(),
               nullable=False)
    op.drop_table('staff')
    # ### end Alembic commands ###
