"""empty message

Revision ID: c03e1b6eacfb
Revises: c29222776b79
Create Date: 2019-11-27 20:43:08.998754

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

# revision identifiers, used by Alembic.
revision = 'c03e1b6eacfb'
down_revision = 'c29222776b79'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('blockset', sa.Column('title', sa.String(length=256), nullable=True))
    op.drop_index('name', table_name='blockset')
    op.create_unique_constraint(None, 'blockset', ['title'])
    op.drop_column('blockset', 'name')
    op.add_column('dataset', sa.Column('title', sa.String(length=256), nullable=True))
    op.drop_index('name', table_name='dataset')
    op.create_unique_constraint(None, 'dataset', ['title'])
    op.drop_column('dataset', 'name')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('dataset', sa.Column('name', mysql.VARCHAR(length=256), nullable=True))
    op.drop_constraint(None, 'dataset', type_='unique')
    op.create_index('name', 'dataset', ['name'], unique=True)
    op.drop_column('dataset', 'title')
    op.add_column('blockset', sa.Column('name', mysql.VARCHAR(length=256), nullable=True))
    op.drop_constraint(None, 'blockset', type_='unique')
    op.create_index('name', 'blockset', ['name'], unique=True)
    op.drop_column('blockset', 'title')
    # ### end Alembic commands ###
