"""Added Columns to product table

Revision ID: d5404c3f0892
Revises: e46758f4374f
Create Date: 2019-11-10 08:38:56.864426

"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = 'd5404c3f0892'
down_revision = 'e46758f4374f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('product', sa.Column('condition', sa.String(length=100), nullable=False))
    op.add_column('product', sa.Column('on_sale_price', sa.Float(), nullable=True))
    op.add_column('product', sa.Column('stock', sa.Integer(), nullable=True))
    op.drop_column('product', 'discount')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('product', sa.Column('discount', mysql.FLOAT(), nullable=True))
    op.drop_column('product', 'stock')
    op.drop_column('product', 'on_sale_price')
    op.drop_column('product', 'condition')
    # ### end Alembic commands ###
