"""Create quarterly_revalidation_threshold table

Revision ID: 591024d9958f
Revises: 8d66e1b5702d
Create Date: 2019-02-15 09:13:36.167489

"""

# revision identifiers, used by Alembic.
revision = '591024d9958f'
down_revision = '8d66e1b5702d'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


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


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





def upgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('quarterly_revalidation_threshold',
        sa.Column('created_at', sa.DateTime(), nullable=True),
        sa.Column('updated_at', sa.DateTime(), nullable=True),
        sa.Column('quarterly_revalidation_threshold_id', sa.Integer(), nullable=False),
        sa.Column('year', sa.Integer(), nullable=False),
        sa.Column('quarter', sa.Integer(), nullable=False),
        sa.Column('window_start', sa.DateTime(), nullable=True),
        sa.PrimaryKeyConstraint('quarterly_revalidation_threshold_id')
    )
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('quarterly_revalidation_threshold')
    # ### end Alembic commands ###

