<gh_stars>10-100
"""alter MetricsRegionCache add enrollment_status column

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2019-02-19 14:56:40.744067

"""
from alembic import op

# revision identifiers, used by Alembic.
revision = "<KEY>"
down_revision = "dccd00ad61d6"
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.execute(
        "ALTER TABLE metrics_region_cache ADD COLUMN enrollment_status VARCHAR(50) NOT NULL AFTER `date_inserted`;"
    )
    op.execute("ALTER TABLE metrics_region_cache DROP PRIMARY KEY")
    op.execute(
        "ALTER TABLE metrics_region_cache ADD PRIMARY KEY (`date_inserted`,`hpo_id`,`hpo_name`,`date`,`state_name`,`enrollment_status`)"
    )
    # ### end Alembic commands ###


def downgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("metrics_region_cache", "enrollment_status")
    # ### 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 ###

"""alter MetricsRegionCache add enrollment_status column

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2019-02-19 14:56:40.744067

"""
from alembic import op

# revision identifiers, used by Alembic.
revision = "<KEY>"
down_revision = "dccd00ad61d6"
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.execute(
        "ALTER TABLE metrics_region_cache ADD COLUMN enrollment_status VARCHAR(50) NOT NULL AFTER `date_inserted`;"
    )
    op.execute("ALTER TABLE metrics_region_cache DROP PRIMARY KEY")
    op.execute(
        "ALTER TABLE metrics_region_cache ADD PRIMARY KEY (`date_inserted`,`hpo_id`,`hpo_name`,`date`,`state_name`,`enrollment_status`)"
    )
    # ### end Alembic commands ###


def downgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("metrics_region_cache", "enrollment_status")
    # ### 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 ###
alter MetricsRegionCache add enrollment_status column  Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2019-02-19 14:56:40.744067 # 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 ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###