"""empty message

Revision ID: ba446c83b09d
Revises: 16084d545d98
Create Date: 2020-11-12 10:32:58.609015

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ba446c83b09d'
down_revision = '16084d545d98'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('tblcounting_inv', 'sap_number')
    op.add_column('tblcounting_inv_row', sa.Column('whsecode', sa.String(length=100), nullable=False))
    op.create_foreign_key(None, 'tblcounting_inv_row', 'tblwhses', ['whsecode'], ['whsecode'], onupdate='CASCADE', ondelete='CASCADE')
    op.add_column('tblitemreq', sa.Column('confirm', sa.Boolean(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('tblitemreq', 'confirm')
    op.drop_constraint(None, 'tblcounting_inv_row', type_='foreignkey')
    op.drop_column('tblcounting_inv_row', 'whsecode')
    op.add_column('tblcounting_inv', sa.Column('sap_number', sa.INTEGER(), autoincrement=False, nullable=True))
    # ### end Alembic commands ###
