<reponame>havanhuy1997/pmg-cms-2
"""cascades

Revision ID: 4e34e26ddbad
Revises: 51e2dcf51b13
Create Date: 2015-04-22 17:39:16.188879

"""

# revision identifiers, used by Alembic.
revision = '4e34e26ddbad'
down_revision = '51e2dcf51b13'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint("event_bills_bill_id_fkey", 'event_bills')
    op.create_foreign_key('event_bills_bill_id_fkey', 'event_bills', 'bill', ['bill_id'], ['id'], ondelete='CASCADE')

    op.drop_constraint("event_bills_event_id_fkey", 'event_bills')
    op.create_foreign_key('event_bills_event_id_fkey', 'event_bills', 'event', ['event_id'], ['id'], ondelete='CASCADE')

    op.drop_constraint("committee_members_member_id_fkey", 'committee_members')
    op.create_foreign_key('committee_members_member_id_fkey', 'committee_members', 'member', ['member_id'], ['id'], ondelete='CASCADE')


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###

"""cascades

Revision ID: 4e34e26ddbad
Revises: 51e2dcf51b13
Create Date: 2015-04-22 17:39:16.188879

"""

# revision identifiers, used by Alembic.
revision = '4e34e26ddbad'
down_revision = '51e2dcf51b13'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint("event_bills_bill_id_fkey", 'event_bills')
    op.create_foreign_key('event_bills_bill_id_fkey', 'event_bills', 'bill', ['bill_id'], ['id'], ondelete='CASCADE')

    op.drop_constraint("event_bills_event_id_fkey", 'event_bills')
    op.create_foreign_key('event_bills_event_id_fkey', 'event_bills', 'event', ['event_id'], ['id'], ondelete='CASCADE')

    op.drop_constraint("committee_members_member_id_fkey", 'committee_members')
    op.create_foreign_key('committee_members_member_id_fkey', 'committee_members', 'member', ['member_id'], ['id'], ondelete='CASCADE')


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###
cascades  Revision ID: 4e34e26ddbad Revises: 51e2dcf51b13 Create Date: 2015-04-22 17:39:16.188879 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ###