"""rename column

Revision ID: 0ff075f16b94
Revises: f84493df4297
Create Date: 2021-11-02 17:07:48.428164

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0ff075f16b94'
down_revision = 'f84493df4297'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('attribute_boolean', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_date', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_date_time', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_float', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_integer', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_time', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_unicode_text', schema=None) as batch_op:
        batch_op.alter_column('attribute_id', new_column_name='iid', existing_type=sa.Integer())

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('attribute_unicode_text', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_time', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_integer', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_float', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_date_time', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_date', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    with op.batch_alter_table('attribute_boolean', schema=None) as batch_op:
        batch_op.alter_column('iid', new_column_name='attribute_id', existing_type=sa.Integer())

    # ### end Alembic commands ###
