"""updating reporting start/end date to be required

Revision ID: b0445ef35b9a
Revises: 449ab366f333
Create Date: 2016-08-16 10:01:20.380132

"""

# revision identifiers, used by Alembic.
revision = 'b0445ef35b9a'
down_revision = '449ab366f333'
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.alter_column('submission', 'reporting_end_date',
               existing_type=sa.DATE(),
               nullable=False)
    op.alter_column('submission', 'reporting_start_date',
               existing_type=sa.DATE(),
               nullable=False)
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('submission', 'reporting_start_date',
               existing_type=sa.DATE(),
               nullable=True)
    op.alter_column('submission', 'reporting_end_date',
               existing_type=sa.DATE(),
               nullable=True)
    ### end Alembic commands ###

