"""moving tile_id to match

Revision ID: a69f8ae5fb9c
Revises: <KEY>
Create Date: 2016-09-19 17:27:52.799473

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<KEY>'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('Match', sa.Column('tile_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key(u'Match_tile_id_fkey', 'Match', 'Tile', ['tile_id'], ['id'])
    op.drop_constraint('_match_uc', 'Match', type_='unique')
    op.create_unique_constraint(u'_match_uc', 'Match', ['pawprint_src_id', 'master_src_id', 'tile_id'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'_match_uc', 'Match', type_='unique')
    op.create_unique_constraint('_match_uc', 'Match', ['pawprint_src_id', 'master_src_id'])
    op.drop_constraint(u'Match_tile_id_fkey', 'Match', type_='foreignkey')
    op.drop_column('Match', 'tile_id')
    ### end Alembic commands ###

"""moving tile_id to match

Revision ID: a69f8ae5fb9c
Revises: <KEY>
Create Date: 2016-09-19 17:27:52.799473

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<KEY>'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('Match', sa.Column('tile_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key(u'Match_tile_id_fkey', 'Match', 'Tile', ['tile_id'], ['id'])
    op.drop_constraint('_match_uc', 'Match', type_='unique')
    op.create_unique_constraint(u'_match_uc', 'Match', ['pawprint_src_id', 'master_src_id', 'tile_id'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'_match_uc', 'Match', type_='unique')
    op.create_unique_constraint('_match_uc', 'Match', ['pawprint_src_id', 'master_src_id'])
    op.drop_constraint(u'Match_tile_id_fkey', 'Match', type_='foreignkey')
    op.drop_column('Match', 'tile_id')
    ### end Alembic commands ###

moving tile_id to match  Revision ID: a69f8ae5fb9c Revises: <KEY> Create Date: 2016-09-19 17:27:52.799473 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ### ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ###