"""empty message

Revision ID: cb0e433ffd79
Revises: a4c367fb1fdf
Create Date: 2021-04-06 20:48:23.400527

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = 'cb0e433ffd79'
down_revision = 'a4c367fb1fdf'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('devices', sa.Column('device_profile_id', sa.String(length=50), nullable=True))
    op.drop_index('ix_devices_device_profile_name', table_name='devices')
    op.create_index(op.f('ix_devices_device_profile_id'), 'devices', ['device_profile_id'], unique=False)
    op.drop_column('devices', 'device_profile_name')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('devices', sa.Column('device_profile_name', mysql.VARCHAR(length=50), nullable=True))
    op.drop_index(op.f('ix_devices_device_profile_id'), table_name='devices')
    op.create_index('ix_devices_device_profile_name', 'devices', ['device_profile_name'], unique=False)
    op.drop_column('devices', 'device_profile_id')
    # ### end Alembic commands ###
