def upgrade():
    op.drop_constraint('question_reply_committee_id_fkey', 'question_reply')
    op.create_foreign_key('question_reply_committee_id_fkey', 'question_reply', 'committee', ['committee_id'], ['id'], ondelete='SET NULL')
    op.drop_constraint('tabled_committee_report_committee_id_fkey', 'tabled_committee_report')
    op.create_foreign_key('tabled_committee_report_committee_id_fkey', 'tabled_committee_report', 'committee', ['committee_id'], ['id'], ondelete='SET NULL')
    op.drop_constraint('call_for_comment_committee_id_fkey', 'call_for_comment')
    op.create_foreign_key('call_for_comment_committee_id_fkey', 'call_for_comment', 'committee', ['committee_id'], ['id'], ondelete='SET NULL')
def upgrade():
    op.drop_constraint('question_reply_committee_id_fkey', 'question_reply')
    op.create_foreign_key('question_reply_committee_id_fkey', 'question_reply', 'committee', ['committee_id'], ['id'], ondelete='SET NULL')
    op.drop_constraint('tabled_committee_report_committee_id_fkey', 'tabled_committee_report')
    op.create_foreign_key('tabled_committee_report_committee_id_fkey', 'tabled_committee_report', 'committee', ['committee_id'], ['id'], ondelete='SET NULL')
    op.drop_constraint('call_for_comment_committee_id_fkey', 'call_for_comment')
    op.create_foreign_key('call_for_comment_committee_id_fkey', 'call_for_comment', 'committee', ['committee_id'], ['id'], ondelete='SET NULL')