<filename>migrations/versions/1484059dbf06_added_products_model.py
"""added products model

Revision ID: 1484059dbf06
Revises: 880274962223
Create Date: 2020-08-29 17:05:13.598013

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '1484059dbf06'
down_revision = '880274962223'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('products',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=255), nullable=False),
    sa.Column('description', sa.String(length=12000), nullable=False),
    sa.Column('added_on', sa.DateTime(), nullable=False),
    sa.Column('productId', sa.String(length=100), nullable=True),
    sa.Column('supplierId', sa.String(length=100), nullable=False),
    sa.Column('category', sa.String(length=100), nullable=False),
    sa.Column('quantity', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=100), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('productId')
    )
    # ### end Alembic commands ###


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