"""Removed Stock From UsedStock Model, Should be accessing make from the model class

Revision ID: 71dd1da1ec79
Revises: e91a215a89bf
Create Date: 2017-10-09 21:04:23.582000

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

# revision identifiers, used by Alembic.
revision = '71dd1da1ec79'
down_revision = 'e91a215a89bf'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'used_stock_ibfk_1', 'used_stock', type_='foreignkey')
    op.drop_column('used_stock', 'make_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('used_stock', sa.Column('make_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
    op.create_foreign_key(u'used_stock_ibfk_1', 'used_stock', 'makes', ['make_id'], ['id'])
    # ### end Alembic commands ###
