"""add share_inventory

Revision ID: 0c451fc35b86
Revises: fe424f6b86a5
Create Date: 2017-03-28 14:09:45.798715

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0c451fc35b86'
down_revision = 'fe424f6b86a5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('share_inventory',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('applicant_id', sa.Integer(), nullable=True),
    sa.Column('audit_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('status', sa.String(length=50), nullable=True),
    sa.Column('batch_no', sa.String(length=50), nullable=True),
    sa.Column('product_name', sa.String(length=200), nullable=True),
    sa.Column('sku_option', sa.String(length=200), nullable=True),
    sa.Column('sku_code', sa.String(length=30), nullable=True),
    sa.Column('sku_id', sa.Integer(), nullable=True),
    sa.Column('production_date', sa.String(length=30), nullable=True),
    sa.Column('stocks', sa.Float(), nullable=True),
    sa.Column('price', sa.Float(), nullable=True),
    sa.Column('pic_files', sa.JSON(), nullable=True),
    sa.ForeignKeyConstraint(['applicant_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('share_inventory')
    # ### end Alembic commands ###
