"""remove column from attribute tables

Revision ID: 6bd27755b1a8
Revises: e69be63fc3b8
Create Date: 2021-11-02 13:40:15.965707

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '6bd27755b1a8'
down_revision = 'e69be63fc3b8'
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.drop_column('name')

    with op.batch_alter_table('attribute_date', schema=None) as batch_op:
        batch_op.drop_column('name')

    with op.batch_alter_table('attribute_date_time', schema=None) as batch_op:
        batch_op.drop_column('name')

    with op.batch_alter_table('attribute_float', schema=None) as batch_op:
        batch_op.drop_column('name')

    with op.batch_alter_table('attribute_integer', schema=None) as batch_op:
        batch_op.drop_column('name')

    with op.batch_alter_table('attribute_time', schema=None) as batch_op:
        batch_op.drop_column('name')

    with op.batch_alter_table('attribute_unicode_text', schema=None) as batch_op:
        batch_op.drop_column('name')

    # ### 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.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    with op.batch_alter_table('attribute_time', schema=None) as batch_op:
        batch_op.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    with op.batch_alter_table('attribute_integer', schema=None) as batch_op:
        batch_op.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    with op.batch_alter_table('attribute_float', schema=None) as batch_op:
        batch_op.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    with op.batch_alter_table('attribute_date_time', schema=None) as batch_op:
        batch_op.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    with op.batch_alter_table('attribute_date', schema=None) as batch_op:
        batch_op.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    with op.batch_alter_table('attribute_boolean', schema=None) as batch_op:
        batch_op.add_column(sa.Column('name', sa.TEXT(), nullable=True))

    # ### end Alembic commands ###
