"""change column user.province_id to user.associate_group_id

Revision ID: 91b7a3d00a9e
Revises: 84fc7bc201e6
Create Date: 2017-10-25 08:00:01.999168

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

# revision identifiers, used by Alembic.
revision = '91b7a3d00a9e'
down_revision = '84fc7bc201e6'


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('associate_group_id',
                                    sa.String(length=64), nullable=True))
    op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
    op.create_foreign_key(None, 'user', 'associate_group',
                          ['associate_group_id'], ['id'])
    op.drop_column('user', 'province_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('province_id',
                                    mysql.VARCHAR(length=64), nullable=True))
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.create_foreign_key('user_ibfk_1', 'user', 'province',
                          ['province_id'], ['province_id'])
    op.drop_column('user', 'associate_group_id')
    # ### end Alembic commands ###

78f209b84674ad37b9ba6bea1465dcc272611cf1
<mask token>


def upgrade():
    op.add_column('user', sa.Column('associate_group_id', sa.String(length=
        64), nullable=True))
    op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
    op.create_foreign_key(None, 'user', 'associate_group', [
        'associate_group_id'], ['id'])
    op.drop_column('user', 'province_id')


<mask token>

<mask token>


def upgrade():
    op.add_column('user', sa.Column('associate_group_id', sa.String(length=
        64), nullable=True))
    op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
    op.create_foreign_key(None, 'user', 'associate_group', [
        'associate_group_id'], ['id'])
    op.drop_column('user', 'province_id')


def downgrade():
    op.add_column('user', sa.Column('province_id', mysql.VARCHAR(length=64),
        nullable=True))
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.create_foreign_key('user_ibfk_1', 'user', 'province', ['province_id'
        ], ['province_id'])
    op.drop_column('user', 'associate_group_id')

<mask token>
revision = '91b7a3d00a9e'
down_revision = '84fc7bc201e6'


def upgrade():
    op.add_column('user', sa.Column('associate_group_id', sa.String(length=
        64), nullable=True))
    op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
    op.create_foreign_key(None, 'user', 'associate_group', [
        'associate_group_id'], ['id'])
    op.drop_column('user', 'province_id')


def downgrade():
    op.add_column('user', sa.Column('province_id', mysql.VARCHAR(length=64),
        nullable=True))
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.create_foreign_key('user_ibfk_1', 'user', 'province', ['province_id'
        ], ['province_id'])
    op.drop_column('user', 'associate_group_id')

<mask token>
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
revision = '91b7a3d00a9e'
down_revision = '84fc7bc201e6'


def upgrade():
    op.add_column('user', sa.Column('associate_group_id', sa.String(length=
        64), nullable=True))
    op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
    op.create_foreign_key(None, 'user', 'associate_group', [
        'associate_group_id'], ['id'])
    op.drop_column('user', 'province_id')


def downgrade():
    op.add_column('user', sa.Column('province_id', mysql.VARCHAR(length=64),
        nullable=True))
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.create_foreign_key('user_ibfk_1', 'user', 'province', ['province_id'
        ], ['province_id'])
    op.drop_column('user', 'associate_group_id')

"""change column user.province_id to user.associate_group_id

Revision ID: 91b7a3d00a9e
Revises: 84fc7bc201e6
Create Date: 2017-10-25 08:00:01.999168

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

# revision identifiers, used by Alembic.
revision = '91b7a3d00a9e'
down_revision = '84fc7bc201e6'


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('associate_group_id',
                                    sa.String(length=64), nullable=True))
    op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
    op.create_foreign_key(None, 'user', 'associate_group',
                          ['associate_group_id'], ['id'])
    op.drop_column('user', 'province_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('province_id',
                                    mysql.VARCHAR(length=64), nullable=True))
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.create_foreign_key('user_ibfk_1', 'user', 'province',
                          ['province_id'], ['province_id'])
    op.drop_column('user', 'associate_group_id')
    # ### end Alembic commands ###
