"""Add unique index to zips_historical

Revision ID: 17a4a70eb303
Revises: 1d6a64351486
Create Date: 2022-12-05 13:08:42.200612

"""

# revision identifiers, used by Alembic.
revision = '17a4a70eb303'
down_revision = '1d6a64351486'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

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_unique_constraint('uniq_hist_zip5_zip_last4', 'zips_historical', ['zip5', 'zip_last4'])
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('uniq_hist_zip5_zip_last4', 'zips_historical', type_='unique')
    # ### end Alembic commands ###

