"""Create city_code table

Revision ID: ea02faf8bc7a
Revises: 52b3c1a122ce
Create Date: 2017-06-19 12:15:14.513435

"""

# revision identifiers, used by Alembic.
revision = 'ea02faf8bc7a'
down_revision = '52b3c1a122ce'
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('city_code',
        sa.Column('created_at', sa.DateTime(), nullable=True),
        sa.Column('updated_at', sa.DateTime(), nullable=True),
        sa.Column('city_code_id', sa.Integer(), nullable=False),
        sa.Column('feature_name', sa.Text(), nullable=True),
        sa.Column('feature_class', sa.Text(), nullable=True),
        sa.Column('city_code', sa.Text(), nullable=True),
        sa.Column('state_code', sa.Text(), nullable=True),
        sa.Column('county_number', sa.Text(), nullable=True),
        sa.Column('county_name', sa.Text(), nullable=True),
        sa.Column('latitude', sa.Text(), nullable=True),
        sa.Column('longitude', sa.Text(), nullable=True),
        sa.PrimaryKeyConstraint('city_code_id')
    )
    ### end Alembic commands ###


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

