"""create gem to gp migration table

Revision ID: <KEY>
Revises: <KEY>, 88ea<PASSWORD>
Create Date: 2021-10-20 14:25:06.509414

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = ('<KEY>1', '88ea1bb98358')
branch_labels = None
depends_on = None


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


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


def upgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('gem_to_gp_migration',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('modified', sa.DateTime(), nullable=True),
    sa.Column('ignore_flag', sa.SmallInteger(), nullable=False),
    sa.Column('dev_note', sa.String(length=255), nullable=True),
    sa.Column('file_path', sa.String(length=255), nullable=True),
    sa.Column('participant_id', sa.Integer(), nullable=True),
    sa.Column('informing_loop_status', sa.String(length=64), nullable=True),
    sa.Column('informing_loop_authored', sa.DateTime(), nullable=True),
    sa.Column('ancestry_traits_response', sa.String(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_gem_to_gp_migration_ancestry_traits_response'), 'gem_to_gp_migration', ['ancestry_traits_response'], unique=False)
    op.create_index(op.f('ix_gem_to_gp_migration_file_path'), 'gem_to_gp_migration', ['file_path'], unique=False)
    op.create_index(op.f('ix_gem_to_gp_migration_informing_loop_authored'), 'gem_to_gp_migration', ['informing_loop_authored'], unique=False)
    op.create_index(op.f('ix_gem_to_gp_migration_participant_id'), 'gem_to_gp_migration', ['participant_id'], unique=False)
    # ### end Alembic commands ###


def downgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_gem_to_gp_migration_participant_id'), table_name='gem_to_gp_migration')
    op.drop_index(op.f('ix_gem_to_gp_migration_informing_loop_authored'), table_name='gem_to_gp_migration')
    op.drop_index(op.f('ix_gem_to_gp_migration_file_path'), table_name='gem_to_gp_migration')
    op.drop_index(op.f('ix_gem_to_gp_migration_ancestry_traits_response'), table_name='gem_to_gp_migration')
    op.drop_table('gem_to_gp_migration')
    # ### end Alembic commands ###


def upgrade_metrics():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_metrics():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###

