"""empty message

Revision ID: d05bfb05489b
Revises: 
Create Date: 2019-07-15 10:27:12.467447

"""
from alembic import op
import sqlalchemy as sa

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    # op.drop_index('ix_manufacturers_order_index', table_name='manufacturers')
    # op.drop_column('manufacturers', 'order_index')
    op.create_unique_constraint(None, 'pictures', ['name'])
    op.add_column('preferences', sa.Column('active_sale', sa.Boolean(), nullable=True))
    op.add_column('preferences', sa.Column('sale_amount', sa.Integer(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('preferences', 'sale_amount')
    op.drop_column('preferences', 'active_sale')
    op.drop_constraint(None, 'pictures', type_='unique')
    # op.add_column('manufacturers', sa.Column('order_index', sa.INTEGER(), autoincrement=False, nullable=True))
    # op.create_index('ix_manufacturers_order_index', 'manufacturers', ['order_index'], unique=False)
    # ### end Alembic commands ###
