"""empty message

Revision ID: 80ce9ab553fb
Revises: None
Create Date: 2016-10-19 08:17:43.123785

"""

# revision identifiers, used by Alembic.
revision = '80ce9ab553fb'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tag',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=80), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('tags',
    sa.Column('tag_id', sa.Integer(), nullable=True),
    sa.Column('transaction_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['tag_id'], ['tag.id'], ),
    sa.ForeignKeyConstraint(['transaction_id'], ['transaction.id'], )
    )
    op.drop_index('name', table_name='transaction')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
#   op.create_index('name', 'transaction', ['name'], unique=True)    already done manually on server.
    op.drop_table('tags')
    op.drop_table('tag')
    ### end Alembic commands ###
