"""alter user

Revision ID: 60d02e031b3e
Revises: 4278973a8f0e
Create Date: 2018-11-09 09:48:57.709237

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

# revision identifiers, used by Alembic.
revision = '60d02e031b3e'
down_revision = '4278973a8f0e'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('invest_users', 'email',
               existing_type=mysql.VARCHAR(length=128),
               nullable=True,
               existing_server_default=sa.text("''"))
    op.alter_column('invest_users', 'id_card',
               existing_type=mysql.VARCHAR(length=64),
               nullable=True,
               existing_server_default=sa.text("''"))
    op.alter_column('invest_users', 'real_name',
               existing_type=mysql.VARCHAR(length=64),
               nullable=True,
               existing_server_default=sa.text("''"))
    op.alter_column('invest_users', 'user_mobile',
               existing_type=mysql.CHAR(length=64),
               nullable=True,
               existing_server_default=sa.text("''"))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('invest_users', 'user_mobile',
               existing_type=mysql.CHAR(length=64),
               nullable=False,
               existing_server_default=sa.text("''"))
    op.alter_column('invest_users', 'real_name',
               existing_type=mysql.VARCHAR(length=64),
               nullable=False,
               existing_server_default=sa.text("''"))
    op.alter_column('invest_users', 'id_card',
               existing_type=mysql.VARCHAR(length=64),
               nullable=False,
               existing_server_default=sa.text("''"))
    op.alter_column('invest_users', 'email',
               existing_type=mysql.VARCHAR(length=128),
               nullable=False,
               existing_server_default=sa.text("''"))
    # ### end Alembic commands ###
