"""empty message

Revision ID: 15e25000bab0
Revises: None
Create Date: 2016-10-15 17:14:41.599131

"""

# revision identifiers, used by Alembic.
revision = '15e25000bab0'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'comments_post_id_fkey', 'comments', type_='foreignkey')
    op.create_foreign_key(None, 'comments', 'posts', ['post_id'], ['id'], ondelete='CASCADE')
    op.add_column('posts', sa.Column('title', sa.Text(), nullable=True))
    op.drop_constraint(u'tag-post_tag_id_fkey', 'tag-post', type_='foreignkey')
    op.drop_constraint(u'tag-post_post_id_fkey', 'tag-post', type_='foreignkey')
    op.create_foreign_key(None, 'tag-post', 'posts', ['post_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'tag-post', 'tags', ['tag_id'], ['id'], ondelete='CASCADE')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.create_foreign_key(u'tag-post_post_id_fkey', 'tag-post', 'posts', ['post_id'], ['id'])
    op.create_foreign_key(u'tag-post_tag_id_fkey', 'tag-post', 'tags', ['tag_id'], ['id'])
    op.drop_column('posts', 'title')
    op.drop_constraint(None, 'comments', type_='foreignkey')
    op.create_foreign_key(u'comments_post_id_fkey', 'comments', 'posts', ['post_id'], ['id'])
    ### end Alembic commands ###

63812866d402d779adcbc9d16fba86e222663d25
<mask token>


def upgrade():
    op.drop_constraint(u'comments_post_id_fkey', 'comments', type_='foreignkey'
        )
    op.create_foreign_key(None, 'comments', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.add_column('posts', sa.Column('title', sa.Text(), nullable=True))
    op.drop_constraint(u'tag-post_tag_id_fkey', 'tag-post', type_='foreignkey')
    op.drop_constraint(u'tag-post_post_id_fkey', 'tag-post', type_='foreignkey'
        )
    op.create_foreign_key(None, 'tag-post', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.create_foreign_key(None, 'tag-post', 'tags', ['tag_id'], ['id'],
        ondelete='CASCADE')


<mask token>

<mask token>


def upgrade():
    op.drop_constraint(u'comments_post_id_fkey', 'comments', type_='foreignkey'
        )
    op.create_foreign_key(None, 'comments', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.add_column('posts', sa.Column('title', sa.Text(), nullable=True))
    op.drop_constraint(u'tag-post_tag_id_fkey', 'tag-post', type_='foreignkey')
    op.drop_constraint(u'tag-post_post_id_fkey', 'tag-post', type_='foreignkey'
        )
    op.create_foreign_key(None, 'tag-post', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.create_foreign_key(None, 'tag-post', 'tags', ['tag_id'], ['id'],
        ondelete='CASCADE')


def downgrade():
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.create_foreign_key(u'tag-post_post_id_fkey', 'tag-post', 'posts', [
        'post_id'], ['id'])
    op.create_foreign_key(u'tag-post_tag_id_fkey', 'tag-post', 'tags', [
        'tag_id'], ['id'])
    op.drop_column('posts', 'title')
    op.drop_constraint(None, 'comments', type_='foreignkey')
    op.create_foreign_key(u'comments_post_id_fkey', 'comments', 'posts', [
        'post_id'], ['id'])

<mask token>
revision = '15e25000bab0'
down_revision = None
<mask token>


def upgrade():
    op.drop_constraint(u'comments_post_id_fkey', 'comments', type_='foreignkey'
        )
    op.create_foreign_key(None, 'comments', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.add_column('posts', sa.Column('title', sa.Text(), nullable=True))
    op.drop_constraint(u'tag-post_tag_id_fkey', 'tag-post', type_='foreignkey')
    op.drop_constraint(u'tag-post_post_id_fkey', 'tag-post', type_='foreignkey'
        )
    op.create_foreign_key(None, 'tag-post', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.create_foreign_key(None, 'tag-post', 'tags', ['tag_id'], ['id'],
        ondelete='CASCADE')


def downgrade():
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.create_foreign_key(u'tag-post_post_id_fkey', 'tag-post', 'posts', [
        'post_id'], ['id'])
    op.create_foreign_key(u'tag-post_tag_id_fkey', 'tag-post', 'tags', [
        'tag_id'], ['id'])
    op.drop_column('posts', 'title')
    op.drop_constraint(None, 'comments', type_='foreignkey')
    op.create_foreign_key(u'comments_post_id_fkey', 'comments', 'posts', [
        'post_id'], ['id'])

<mask token>
revision = '15e25000bab0'
down_revision = None
from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint(u'comments_post_id_fkey', 'comments', type_='foreignkey'
        )
    op.create_foreign_key(None, 'comments', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.add_column('posts', sa.Column('title', sa.Text(), nullable=True))
    op.drop_constraint(u'tag-post_tag_id_fkey', 'tag-post', type_='foreignkey')
    op.drop_constraint(u'tag-post_post_id_fkey', 'tag-post', type_='foreignkey'
        )
    op.create_foreign_key(None, 'tag-post', 'posts', ['post_id'], ['id'],
        ondelete='CASCADE')
    op.create_foreign_key(None, 'tag-post', 'tags', ['tag_id'], ['id'],
        ondelete='CASCADE')


def downgrade():
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.create_foreign_key(u'tag-post_post_id_fkey', 'tag-post', 'posts', [
        'post_id'], ['id'])
    op.create_foreign_key(u'tag-post_tag_id_fkey', 'tag-post', 'tags', [
        'tag_id'], ['id'])
    op.drop_column('posts', 'title')
    op.drop_constraint(None, 'comments', type_='foreignkey')
    op.create_foreign_key(u'comments_post_id_fkey', 'comments', 'posts', [
        'post_id'], ['id'])

"""empty message

Revision ID: 15e25000bab0
Revises: None
Create Date: 2016-10-15 17:14:41.599131

"""

# revision identifiers, used by Alembic.
revision = '15e25000bab0'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'comments_post_id_fkey', 'comments', type_='foreignkey')
    op.create_foreign_key(None, 'comments', 'posts', ['post_id'], ['id'], ondelete='CASCADE')
    op.add_column('posts', sa.Column('title', sa.Text(), nullable=True))
    op.drop_constraint(u'tag-post_tag_id_fkey', 'tag-post', type_='foreignkey')
    op.drop_constraint(u'tag-post_post_id_fkey', 'tag-post', type_='foreignkey')
    op.create_foreign_key(None, 'tag-post', 'posts', ['post_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'tag-post', 'tags', ['tag_id'], ['id'], ondelete='CASCADE')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.drop_constraint(None, 'tag-post', type_='foreignkey')
    op.create_foreign_key(u'tag-post_post_id_fkey', 'tag-post', 'posts', ['post_id'], ['id'])
    op.create_foreign_key(u'tag-post_tag_id_fkey', 'tag-post', 'tags', ['tag_id'], ['id'])
    op.drop_column('posts', 'title')
    op.drop_constraint(None, 'comments', type_='foreignkey')
    op.create_foreign_key(u'comments_post_id_fkey', 'comments', 'posts', ['post_id'], ['id'])
    ### end Alembic commands ###
