"""empty message

Revision ID: 327e186d0426
Revises: 01e15076066f
Create Date: 2017-08-23 21:02:06.181410

"""

# revision identifiers, used by Alembic.
revision = '327e186d0426'
down_revision = '01e15076066f'

from alembic import op
import sqlalchemy as sa


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('proposition', sa.Column('link', sa.String(length=120), nullable=True, server_default='lorem ipsum',))
    op.add_column('proposition', sa.Column('proposition', sa.String(length=120), nullable=True))
    op.create_index(op.f('ix_proposition_link'), 'proposition', ['link'], unique=False)
    op.create_index(op.f('ix_proposition_proposition'), 'proposition', ['proposition'], unique=True)
    op.drop_index('ix_proposition_name', table_name='proposition')
    op.create_index(op.f('ix_proposition_name'), 'proposition', ['name'], unique=False)
    op.add_column('senator', sa.Column('description1', sa.Text(), nullable=True))
    op.add_column('senator', sa.Column('description2', sa.Text(), nullable=True))
    op.add_column('senator', sa.Column('party_number', sa.Integer(), nullable=False))
    op.drop_column('senator', 'description')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('senator', sa.Column('description', sa.TEXT(), autoincrement=False, nullable=True))
    op.drop_column('senator', 'party_number')
    op.drop_column('senator', 'description2')
    op.drop_column('senator', 'description1')
    op.drop_index(op.f('ix_proposition_name'), table_name='proposition')
    op.create_index('ix_proposition_name', 'proposition', ['name'], unique=True)
    op.drop_index(op.f('ix_proposition_proposition'), table_name='proposition')
    op.drop_index(op.f('ix_proposition_link'), table_name='proposition')
    op.drop_column('proposition', 'proposition')
    op.drop_column('proposition', 'link')
    # ### end Alembic commands ###
