"""Added customer_mode to service_usage and account_history

Revision ID: 42c70f4f379
Revises: 3096003c162
Create Date: 2015-08-24 16:55:35.609060

"""

# revision identifiers, used by Alembic.
revision = '42c70f4f379'
down_revision = '3096003c162'
branch_labels = None
depends_on = None

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

def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_account():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('account_history', sa.Column('customer_mode', sa.Enum('test', 'pending_prod', 'production'), nullable=False))
    op.drop_column('entity_customer_info', 'organization_type')
    op.add_column('service_usage', sa.Column('customer_mode', sa.Enum('test', 'pending_prod', 'production'), nullable=True))
    ### end Alembic commands ###


def downgrade_account():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('service_usage', 'customer_mode')
    op.add_column('entity_customer_info', sa.Column('organization_type', mysql.VARCHAR(length=8), nullable=True))
    op.drop_column('account_history', 'customer_mode')
    ### end Alembic commands ###


def upgrade_fitter():
    pass


def downgrade_fitter():
    pass

