"""Add country_code_2_char column to country_code table

Revision ID: 6a7fa3623e2c
Revises: 4d64c79360af
Create Date: 2021-08-25 13:55:39.566227

"""

# revision identifiers, used by Alembic.
revision = '6a7fa3623e2c'
down_revision = '4d64c79360af'
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.add_column('country_code', sa.Column('country_code_2_char', sa.Text(), nullable=True))
    op.create_index(op.f('ix_country_code_country_code_2_char'), 'country_code', ['country_code_2_char'], unique=False)
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_country_code_country_code_2_char'), table_name='country_code')
    op.drop_column('country_code', 'country_code_2_char')
    # ### end Alembic commands ###

