"""empty message

Revision ID: e18f306d4361
Revises: e86ee0b8094a
Create Date: 2020-11-08 11:01:07.337834

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = 'e18f306d4361'
down_revision = 'e86ee0b8094a'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user_checkin', sa.Column('branch_id', sa.Integer(), nullable=False, server_default='1'))
    op.alter_column('user_checkin', 'staff_id',
                    existing_type=sa.INTEGER(),
                    nullable=False)
    op.create_foreign_key(None, 'user_checkin', 'branch', ['branch_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'user_checkin', type_='foreignkey')
    op.alter_column('user_checkin', 'staff_id',
                    existing_type=sa.INTEGER(),
                    nullable=True)
    op.drop_column('user_checkin', 'branch_id')
    # ### end Alembic commands ###
