"""alter tables

Revision ID: 47c3c81ada65
Revises: 7151cc434cb4
Create Date: 2018-10-31 08:41:08.604982

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

# revision identifiers, used by Alembic.
revision = '47c3c81ada65'
down_revision = '7151cc434cb4'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('user_mobile', table_name='invest_users')
    op.drop_column('invest_users', 'user_mobile')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('invest_users', sa.Column('user_mobile', mysql.CHAR(length=12), server_default=sa.text("''"), nullable=False))
    op.create_index('user_mobile', 'invest_users', ['user_mobile'], unique=True)
    # ### end Alembic commands ###
