<gh_stars>1-10
"""empty message

Revision ID: 803239820882
Revises: <PASSWORD>
Create Date: 2018-12-28 14:28:31.105190

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

# revision identifiers, used by Alembic.
revision = '803239820882'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


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


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