 -- MigrationRecorder.Migration.objects.filter(app__in=['impact','mc']).delete()
 
 
--- delete content types for accelerator models that are later "recreated"
-/*
-from django.contrib.contenttypes.models import ContentType
-ContentType.objects.filter(app_label="accelerator").exclude(model="currency").delete()
-
- */
+-- delete unused user permissions objects
 DELETE
 FROM `auth_user_user_permissions`
 WHERE `auth_user_user_permissions`.`permission_id` IN (512,

--
-- Alter unique_together for startupteammember (1 constraint(s))
--
ALTER TABLE `accelerator_startupteammember` ADD CONSTRAINT `accelerator_startupteammember_startup_id_582d4474_uniq` UNIQUE (`startup_id`, `user_id`);
--
-- Alter unique_together for startupstatus (1 constraint(s))
--
ALTER TABLE `accelerator_startupstatus` ADD CONSTRAINT `accelerator_startupstatus_startup_id_124d9916_uniq` UNIQUE (`startup_id`, `program_startup_status_id`);
--
-- Alter unique_together for startupmentortrackingrecord (1 constraint(s))
--
ALTER TABLE `accelerator_startupmentortrackingrecord` ADD CONSTRAINT `accelerator_startupmentortrackingrecord_startup_id_1242e204_uniq` UNIQUE (`startup_id`, `program_id`);
--
-- Alter unique_together for siteprogramauthorization (1 constraint(s))
--
ALTER TABLE `accelerator_siteprogramauthorization` ADD CONSTRAINT `accelerator_siteprogramauthorization_site_id_aed5187c_uniq` UNIQUE (`site_id`, `program_id`);
--
-- Alter unique_together for scenariopreference (1 constraint(s))
--
ALTER TABLE `accelerator_scenariopreference` ADD CONSTRAINT `accelerator_scenariopreference_scenario_id_5f376349_uniq` UNIQUE (`scenario_id`, `priority`, `entity_type`);
--
-- Alter unique_together for scenariojudge (1 constraint(s))
--
ALTER TABLE `accelerator_scenariojudge` ADD CONSTRAINT `accelerator_scenariojudge_scenario_id_5e6dced4_uniq` UNIQUE (`scenario_id`, `judge_id`);
--
-- Alter unique_together for scenarioapplication (1 constraint(s))
--
ALTER TABLE `accelerator_scenarioapplication` ADD CONSTRAINT `accelerator_scenarioapplication_scenario_id_ff7143f3_uniq` UNIQUE (`scenario_id`, `application_id`);
--
-- Alter unique_together for programstartupattribute (1 constraint(s))
--
ALTER TABLE `accelerator_programstartupattribute` ADD CONSTRAINT `accelerator_programstartupattribute_program_id_1af62fa8_uniq` UNIQUE (`program_id`, `attribute_label`);
--
-- Alter unique_together for programrolegrant (1 constraint(s))
--
ALTER TABLE `accelerator_programrolegrant` ADD CONSTRAINT `accelerator_programrolegrant_person_id_11dc9f10_uniq` UNIQUE (`person_id`, `program_role_id`);
--
-- Alter unique_together for partnerteammember (1 constraint(s))
--
ALTER TABLE `accelerator_partnerteammember` ADD CONSTRAINT `accelerator_partnerteammember_partner_id_bd54ec64_uniq` UNIQUE (`partner_id`, `team_member_id`);
--
-- Alter unique_together for mentorprogramofficehour (1 constraint(s))
--
ALTER TABLE `accelerator_mentorprogramofficehour` ADD CONSTRAINT `accelerator_mentorprogramofficehour_program_id_2905068d_uniq` UNIQUE (`program_id`, `mentor_id`, `date`, `start_time`);
--
-- Alter unique_together for judginground (1 constraint(s))
--
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `accelerator_judginground_program_id_d179d450_uniq` UNIQUE (`program_id`, `name`);
--
-- Alter unique_together for judgeroundcommitment (1 constraint(s))
--
ALTER TABLE `accelerator_judgeroundcommitment` ADD CONSTRAINT `accelerator_judgeroundcommitment_judge_id_aa4b584b_uniq` UNIQUE (`judge_id`, `judging_round_id`);
--
-- Alter unique_together for judgepanelassignment (1 constraint(s))
--
ALTER TABLE `accelerator_judgepanelassignment` ADD CONSTRAINT `accelerator_judgepanelassignment_judge_id_050c6a17_uniq` UNIQUE (`judge_id`, `panel_id`, `scenario_id`);
--
-- Alter unique_together for judgefeedbackcomponent (1 constraint(s))
--
ALTER TABLE `accelerator_judgefeedbackcomponent` ADD CONSTRAINT `accelerator_judgefeedbackcompone_judge_feedback_id_4acbbfef_uniq` UNIQUE (`judge_feedback_id`, `feedback_element_id`);
--
-- Alter unique_together for judgeavailability (1 constraint(s))
--
ALTER TABLE `accelerator_judgeavailability` ADD CONSTRAINT `accelerator_judgeavailability_commitment_id_0e462608_uniq` UNIQUE (`commitment_id`, `panel_location_id`, `panel_time_id`, `panel_type_id`);
--
-- Alter unique_together for judgeapplicationfeedback (1 constraint(s))
--
ALTER TABLE `accelerator_judgeapplicationfeedback` ADD CONSTRAINT `accelerator_judgeapplicationfeedbac_application_id_949b3b4f_uniq` UNIQUE (`application_id`, `judge_id`, `panel_id`);
--
-- Alter unique_together for clearance (1 constraint(s))
--
ALTER TABLE `accelerator_clearance` ADD CONSTRAINT `accelerator_clearance_user_id_7b9139c2_uniq` UNIQUE (`user_id`, `program_family_id`);
--
-- Alter unique_together for applicationpanelassignment (1 constraint(s))
--
ALTER TABLE `accelerator_applicationpanelassignment` ADD CONSTRAINT `accelerator_applicationpanelassignm_application_id_8506589b_uniq` UNIQUE (`application_id`, `panel_id`, `scenario_id`);
--
-- Alter index_together for judgefeedbackcomponent (1 constraint(s))
--
CREATE INDEX `accelerator_judgefeedbackcomponent_id_2f5f2fba_idx` ON `accelerator_judgefeedbackcomponent` (`id`, `judge_feedback_id`, `feedback_element_id`, `answer_text`);
ALTER TABLE `accelerator_industry` ADD CONSTRAINT `accelerator_indust_parent_id_a2c97e95_fk_accelerator_industry_id` FOREIGN KEY (`parent_id`) REFERENCES `accelerator_industry` (`id`);
CREATE INDEX `accelerator_industry_caf7cc51` ON `accelerator_industry` (`lft`);
CREATE INDEX `accelerator_industry_3cfbd988` ON `accelerator_industry` (`rght`);
CREATE INDEX `accelerator_industry_656442a0` ON `accelerator_industry` (`tree_id`);
CREATE INDEX `accelerator_industry_c9e9a848` ON `accelerator_industry` (`level`);
CREATE INDEX `accelerator_industry_6be37982` ON `accelerator_industry` (`parent_id`);
ALTER TABLE `accelerator_startup` ADD CONSTRAINT `accelerator_star_currency_id_10b3dc69_fk_accelerator_currency_id` FOREIGN KEY (`currency_id`) REFERENCES `accelerator_currency` (`id`);
ALTER TABLE `accelerator_startup` ADD CONSTRAINT `accelera_organization_id_73b3991c_fk_accelerator_organization_id` FOREIGN KEY (`organization_id`) REFERENCES `accelerator_organization` (`id`);
ALTER TABLE `accelerator_startup` ADD CONSTRAINT `accelera_primary_industry_id_eb49739b_fk_accelerator_industry_id` FOREIGN KEY (`primary_industry_id`) REFERENCES `accelerator_industry` (`id`);
ALTER TABLE `accelerator_startup` ADD CONSTRAINT `accelerator_startup_user_id_e5e4c56a_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_startup_related_industry` ADD CONSTRAINT `accelerator_startu_startup_id_c3f51826_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startup_related_industry` ADD CONSTRAINT `accelerator_star_industry_id_e7aad4a2_fk_accelerator_industry_id` FOREIGN KEY (`industry_id`) REFERENCES `accelerator_industry` (`id`);
ALTER TABLE `accelerator_startup_related_industry` ADD CONSTRAINT `accelerator_startup_related_industry_startup_id_3dfc61dd_uniq` UNIQUE (`startup_id`, `industry_id`);
ALTER TABLE `accelerator_startup_recommendation_tags` ADD CONSTRAINT `accelerator_startu_startup_id_7481c218_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startup_recommendation_tags` ADD CONSTRAINT `e56e391f0d95f4e4f86ff0c350ba7e67` FOREIGN KEY (`recommendationtag_id`) REFERENCES `accelerator_recommendationtag` (`id`);
ALTER TABLE `accelerator_startup_recommendation_tags` ADD CONSTRAINT `accelerator_startup_recommendation_tags_startup_id_9f3106bb_uniq` UNIQUE (`startup_id`, `recommendationtag_id`);
CREATE INDEX `accelerator_jobposting_99f77c8c` ON `accelerator_jobposting` (`startup_id`);
ALTER TABLE `accelerator_jobposting` ADD CONSTRAINT `accelerator_jobpos_startup_id_5b8063be_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_applicationanswer` ADD CONSTRAINT `accelerato_application_id_b771cf55_fk_accelerator_application_id` FOREIGN KEY (`application_id`) REFERENCES `accelerator_application` (`id`);
ALTER TABLE `accelerator_programcycle` ADD CONSTRAINT `D33b237f547b7acc0010c8ade8df6f39` FOREIGN KEY (`default_application_type_id`) REFERENCES `accelerator_applicationtype` (`id`);
ALTER TABLE `accelerator_programcycle` ADD CONSTRAINT `D13b92be3a14ce323f50cedb38016bda` FOREIGN KEY (`default_overview_application_type_id`) REFERENCES `accelerator_applicationtype` (`id`);
ALTER TABLE `accelerator_startuplabel_startups` ADD CONSTRAINT `accelera_startuplabel_id_9461addd_fk_accelerator_startuplabel_id` FOREIGN KEY (`startuplabel_id`) REFERENCES `accelerator_startuplabel` (`id`);
ALTER TABLE `accelerator_startuplabel_startups` ADD CONSTRAINT `accelerator_startu_startup_id_e90b9b39_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startuplabel_startups` ADD CONSTRAINT `accelerator_startuplabel_startups_startuplabel_id_a9e72832_uniq` UNIQUE (`startuplabel_id`, `startup_id`);
CREATE INDEX `accelerator_program_d7b272e0` ON `accelerator_program` (`cycle_id`);
ALTER TABLE `accelerator_program` ADD CONSTRAINT `accelerator_pro_cycle_id_82214972_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
CREATE INDEX `accelerator_program_6c161578` ON `accelerator_program` (`mentor_program_group_id`);
ALTER TABLE `accelerator_program` ADD CONSTRAINT `ac_mentor_program_group_id_c44df547_fk_accelerator_namedgroup_id` FOREIGN KEY (`mentor_program_group_id`) REFERENCES `accelerator_namedgroup` (`id`);
CREATE INDEX `accelerator_program_4645df85` ON `accelerator_program` (`program_family_id`);
ALTER TABLE `accelerator_program` ADD CONSTRAINT `accel_program_family_id_a9b8c880_fk_accelerator_programfamily_id` FOREIGN KEY (`program_family_id`) REFERENCES `accelerator_programfamily` (`id`);
CREATE INDEX `accelerator_applicationtype_fcd6cf16` ON `accelerator_applicationtype` (`submission_label_id`);
ALTER TABLE `accelerator_applicationtype` ADD CONSTRAINT `acce_submission_label_id_499c9a6d_fk_accelerator_startuplabel_id` FOREIGN KEY (`submission_label_id`) REFERENCES `accelerator_startuplabel` (`id`);
CREATE INDEX `accelerator_applicationquestion_41d946db` ON `accelerator_applicationquestion` (`application_type_id`);
ALTER TABLE `accelerator_applicationquestion` ADD CONSTRAINT `a_application_type_id_c1c3a702_fk_accelerator_applicationtype_id` FOREIGN KEY (`application_type_id`) REFERENCES `accelerator_applicationtype` (`id`);
CREATE INDEX `accelerator_applicationquestion_429b1823` ON `accelerator_applicationquestion` (`program_id`);
ALTER TABLE `accelerator_applicationquestion` ADD CONSTRAINT `accelerator_applic_program_id_544441d7_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
CREATE INDEX `accelerator_applicationquestion_7aa0f6ee` ON `accelerator_applicationquestion` (`question_id`);
ALTER TABLE `accelerator_applicationquestion` ADD CONSTRAINT `accelerator_appl_question_id_e0664613_fk_accelerator_question_id` FOREIGN KEY (`question_id`) REFERENCES `accelerator_question` (`id`);
CREATE INDEX `accelerator_applicationanswer_5a14aa43` ON `accelerator_applicationanswer` (`application_question_id`);
ALTER TABLE `accelerator_applicationanswer` ADD CONSTRAINT `D7e8d11c870e936b8e8cb1872825922a` FOREIGN KEY (`application_question_id`) REFERENCES `accelerator_applicationquestion` (`id`);
CREATE INDEX `accelerator_application_41d946db` ON `accelerator_application` (`application_type_id`);
ALTER TABLE `accelerator_application` ADD CONSTRAINT `a_application_type_id_198546d9_fk_accelerator_applicationtype_id` FOREIGN KEY (`application_type_id`) REFERENCES `accelerator_applicationtype` (`id`);
CREATE INDEX `accelerator_application_d7b272e0` ON `accelerator_application` (`cycle_id`);
ALTER TABLE `accelerator_application` ADD CONSTRAINT `accelerator_app_cycle_id_67f1dd23_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
CREATE INDEX `accelerator_application_99f77c8c` ON `accelerator_application` (`startup_id`);
ALTER TABLE `accelerator_application` ADD CONSTRAINT `accelerator_applic_startup_id_e30524c0_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_applicationpanelassignment` ADD CONSTRAINT `accelerato_application_id_9869485b_fk_accelerator_application_id` FOREIGN KEY (`application_id`) REFERENCES `accelerator_application` (`id`);
ALTER TABLE `accelerator_bucketstate` ADD CONSTRAINT `accelerator_buc_cycle_id_2e3459c0_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
ALTER TABLE `accelerator_clearance` ADD CONSTRAINT `accel_program_family_id_d254a3b3_fk_accelerator_programfamily_id` FOREIGN KEY (`program_family_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `accelerator_clearance` ADD CONSTRAINT `accelerator_clearance_user_id_6712d50e_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile` ADD CONSTRAINT `accelerato_current_program_id_74044f0a_fk_accelerator_program_id` FOREIGN KEY (`current_program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_functionalexpertise` ADD CONSTRAINT `acceler_parent_id_590e8e95_fk_accelerator_functionalexpertise_id` FOREIGN KEY (`parent_id`) REFERENCES `accelerator_functionalexpertise` (`id`);
CREATE INDEX `accelerator_functionalexpertise_caf7cc51` ON `accelerator_functionalexpertise` (`lft`);
CREATE INDEX `accelerator_functionalexpertise_3cfbd988` ON `accelerator_functionalexpertise` (`rght`);
CREATE INDEX `accelerator_functionalexpertise_656442a0` ON `accelerator_functionalexpertise` (`tree_id`);
CREATE INDEX `accelerator_functionalexpertise_c9e9a848` ON `accelerator_functionalexpertise` (`level`);
CREATE INDEX `accelerator_functionalexpertise_6be37982` ON `accelerator_functionalexpertise` (`parent_id`);
ALTER TABLE `accelerator_interestcategory` ADD CONSTRAINT `accelerator_intere_program_id_97bf5cb1_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_judgeapplicationfeedback` ADD CONSTRAINT `accelerato_application_id_29d5672d_fk_accelerator_application_id` FOREIGN KEY (`application_id`) REFERENCES `accelerator_application` (`id`);
ALTER TABLE `accelerator_judgepanelassignment` ADD CONSTRAINT `accelerator_judgepanelassignme_judge_id_eee979eb_fk_auth_user_id` FOREIGN KEY (`judge_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_judgeroundcommitment` ADD CONSTRAINT `accelerator_judgeroundcommitme_judge_id_beda4b2f_fk_auth_user_id` FOREIGN KEY (`judge_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_judgingformelement` ADD CONSTRAINT `a4054f3c040212bc8faf8eb5bf3962f5` FOREIGN KEY (`application_question_id`) REFERENCES `accelerator_applicationquestion` (`id`);
ALTER TABLE `accelerator_judgingformelement` ADD CONSTRAINT `accelerator__form_type_id_f0f0b855_fk_accelerator_judgingform_id` FOREIGN KEY (`form_type_id`) REFERENCES `accelerator_judgingform` (`id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `a_application_type_id_69059c57_fk_accelerator_applicationtype_id` FOREIGN KEY (`application_type_id`) REFERENCES `accelerator_applicationtype` (`id`);
ALTER TABLE `accelerator_memberprofile` ADD CONSTRAINT `accelerato_current_program_id_f6538fd3_fk_accelerator_program_id` FOREIGN KEY (`current_program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_memberprofile` ADD CONSTRAINT `accelerator_memberprofile_user_id_1ee08fa8_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_memberprofile_interest_categories` ADD CONSTRAINT `accele_memberprofile_id_b9c3b5ae_fk_accelerator_memberprofile_id` FOREIGN KEY (`memberprofile_id`) REFERENCES `accelerator_memberprofile` (`id`);
ALTER TABLE `accelerator_memberprofile_interest_categories` ADD CONSTRAINT `interestcategory_id_cc9c6ee4_fk_accelerator_interestcategory_id` FOREIGN KEY (`interestcategory_id`) REFERENCES `accelerator_interestcategory` (`id`);
ALTER TABLE `accelerator_memberprofile_interest_categories` ADD CONSTRAINT `accelerator_memberprofile_interes_memberprofile_id_c2e35c5a_uniq` UNIQUE (`memberprofile_id`, `interestcategory_id`);
ALTER TABLE `accelerator_memberprofile_program_families` ADD CONSTRAINT `accele_memberprofile_id_3639d592_fk_accelerator_memberprofile_id` FOREIGN KEY (`memberprofile_id`) REFERENCES `accelerator_memberprofile` (`id`);
ALTER TABLE `accelerator_memberprofile_program_families` ADD CONSTRAINT `accele_programfamily_id_1082beda_fk_accelerator_programfamily_id` FOREIGN KEY (`programfamily_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `accelerator_memberprofile_program_families` ADD CONSTRAINT `accelerator_memberprofile_program_memberprofile_id_e094f435_uniq` UNIQUE (`memberprofile_id`, `programfamily_id`);
ALTER TABLE `accelerator_memberprofile_recommendation_tags` ADD CONSTRAINT `accele_memberprofile_id_a23949c5_fk_accelerator_memberprofile_id` FOREIGN KEY (`memberprofile_id`) REFERENCES `accelerator_memberprofile` (`id`);
ALTER TABLE `accelerator_memberprofile_recommendation_tags` ADD CONSTRAINT `b462b5c4ff24d4b8f5d6032191914bc3` FOREIGN KEY (`recommendationtag_id`) REFERENCES `accelerator_recommendationtag` (`id`);
ALTER TABLE `accelerator_memberprofile_recommendation_tags` ADD CONSTRAINT `accelerator_memberprofile_recomme_memberprofile_id_4fad2f4b_uniq` UNIQUE (`memberprofile_id`, `recommendationtag_id`);
ALTER TABLE `accelerator_mentorprogramofficehour` ADD CONSTRAINT `accelerator_mentorprogramof_finalist_id_753752bf_fk_auth_user_id` FOREIGN KEY (`finalist_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_mentorprogramofficehour` ADD CONSTRAINT `accelerator_mentorprogramoffi_mentor_id_4d40039a_fk_auth_user_id` FOREIGN KEY (`mentor_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_mentorprogramofficehour` ADD CONSTRAINT `accelerator_mentor_program_id_7bd22248_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
CREATE INDEX `accelerator_mentorprogramofficehour_5fc73231` ON `accelerator_mentorprogramofficehour` (`date`);
CREATE INDEX `accelerator_mentorprogramofficehour_c4d98dbd` ON `accelerator_mentorprogramofficehour` (`start_time`);
CREATE INDEX `accelerator_mentorprogramofficehour_305d2889` ON `accelerator_mentorprogramofficehour` (`end_time`);
ALTER TABLE `accelerator_newsletter` ADD CONSTRAINT `acceler_judging_round_id_1033a046_fk_accelerator_judginground_id` FOREIGN KEY (`judging_round_id`) REFERENCES `accelerator_judginground` (`id`);
ALTER TABLE `accelerator_newsletter` ADD CONSTRAINT `accelerator_newsle_program_id_15e39d9f_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_newsletterreceipt` ADD CONSTRAINT `accelerator__newsletter_id_26434575_fk_accelerator_newsletter_id` FOREIGN KEY (`newsletter_id`) REFERENCES `accelerator_newsletter` (`id`);
ALTER TABLE `accelerator_newsletterreceipt` ADD CONSTRAINT `accelerator_newsletterrece_recipient_id_d50b74ed_fk_auth_user_id` FOREIGN KEY (`recipient_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_panellocation` ADD CONSTRAINT `acceler_judging_round_id_f94734b3_fk_accelerator_judginground_id` FOREIGN KEY (`judging_round_id`) REFERENCES `accelerator_judginground` (`id`);
ALTER TABLE `accelerator_paneltime` ADD CONSTRAINT `acceler_judging_round_id_71f51316_fk_accelerator_judginground_id` FOREIGN KEY (`judging_round_id`) REFERENCES `accelerator_judginground` (`id`);
ALTER TABLE `accelerator_paneltype` ADD CONSTRAINT `acceler_judging_round_id_883e88ce_fk_accelerator_judginground_id` FOREIGN KEY (`judging_round_id`) REFERENCES `accelerator_judginground` (`id`);
ALTER TABLE `accelerator_partner` ADD CONSTRAINT `accelera_organization_id_bb096079_fk_accelerator_organization_id` FOREIGN KEY (`organization_id`) REFERENCES `accelerator_organization` (`id`);
ALTER TABLE `accelerator_partnerteammember` ADD CONSTRAINT `accelerator_partne_partner_id_dfeb30d7_fk_accelerator_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `accelerator_partner` (`id`);
ALTER TABLE `accelerator_partnerteammember` ADD CONSTRAINT `accelerator_partnerteamm_team_member_id_c1227a94_fk_auth_user_id` FOREIGN KEY (`team_member_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_programoverride` ADD CONSTRAINT `accelerator_pro_cycle_id_f606cfda_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
ALTER TABLE `accelerator_programoverride` ADD CONSTRAINT `accelerator_progra_program_id_9fb54f92_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_programpartner` ADD CONSTRAINT `accelerator_progra_partner_id_02b85e70_fk_accelerator_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `accelerator_partner` (`id`);
ALTER TABLE `accelerator_programpartnertype` ADD CONSTRAINT `accelerator_progra_program_id_b2114b9e_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_programrole` ADD CONSTRAINT `accelerator_progra_program_id_f691f66f_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_programrolegrant` ADD CONSTRAINT `accelerator_programrolegrant_person_id_83afe265_fk_auth_user_id` FOREIGN KEY (`person_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_programrolegrant` ADD CONSTRAINT `accelerat_program_role_id_0c2d04ea_fk_accelerator_programrole_id` FOREIGN KEY (`program_role_id`) REFERENCES `accelerator_programrole` (`id`);
ALTER TABLE `accelerator_programstartupattribute` ADD CONSTRAINT `accelerator_progra_program_id_e5142815_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_programstartupstatus` ADD CONSTRAINT `accelerator_progra_program_id_31bce7ba_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_refundcode` ADD CONSTRAINT `accelerator_refu_issued_to_id_2063162e_fk_accelerator_partner_id` FOREIGN KEY (`issued_to_id`) REFERENCES `accelerator_partner` (`id`);
ALTER TABLE `accelerator_refundcode_programs` ADD CONSTRAINT `accelerator__refundcode_id_a3f04c03_fk_accelerator_refundcode_id` FOREIGN KEY (`refundcode_id`) REFERENCES `accelerator_refundcode` (`id`);
ALTER TABLE `accelerator_refundcode_programs` ADD CONSTRAINT `accelerator_refund_program_id_b17dc915_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_refundcode_programs` ADD CONSTRAINT `accelerator_refundcode_programs_refundcode_id_1789eeed_uniq` UNIQUE (`refundcode_id`, `program_id`);
ALTER TABLE `accelerator_refundcoderedemption` ADD CONSTRAINT `accelerator_ref_cycle_id_de8d1b4b_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
ALTER TABLE `accelerator_refundcoderedemption` ADD CONSTRAINT `accelerator_refund_code_id_7e6d1d76_fk_accelerator_refundcode_id` FOREIGN KEY (`refund_code_id`) REFERENCES `accelerator_refundcode` (`id`);
ALTER TABLE `accelerator_refundcoderedemption` ADD CONSTRAINT `accelerator_refund_startup_id_ce506a88_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_scenarioapplication` ADD CONSTRAINT `accelerato_application_id_2893c306_fk_accelerator_application_id` FOREIGN KEY (`application_id`) REFERENCES `accelerator_application` (`id`);
ALTER TABLE `accelerator_scenarioapplication` ADD CONSTRAINT `accelerator_scen_scenario_id_f364bf38_fk_accelerator_scenario_id` FOREIGN KEY (`scenario_id`) REFERENCES `accelerator_scenario` (`id`);
ALTER TABLE `accelerator_scenariojudge` ADD CONSTRAINT `accelerator_scenariojudge_judge_id_1f7f909c_fk_auth_user_id` FOREIGN KEY (`judge_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_scenariojudge` ADD CONSTRAINT `accelerator_scen_scenario_id_52c1bbe8_fk_accelerator_scenario_id` FOREIGN KEY (`scenario_id`) REFERENCES `accelerator_scenario` (`id`);
ALTER TABLE `accelerator_scenariopreference` ADD CONSTRAINT `accelerator_scen_scenario_id_2de733b7_fk_accelerator_scenario_id` FOREIGN KEY (`scenario_id`) REFERENCES `accelerator_scenario` (`id`);
ALTER TABLE `accelerator_section` ADD CONSTRAINT `accelerator__newsletter_id_a942ee9a_fk_accelerator_newsletter_id` FOREIGN KEY (`newsletter_id`) REFERENCES `accelerator_newsletter` (`id`);
ALTER TABLE `accelerator_section_interest_categories` ADD CONSTRAINT `accelerator_sectio_section_id_9bc17408_fk_accelerator_section_id` FOREIGN KEY (`section_id`) REFERENCES `accelerator_section` (`id`);
ALTER TABLE `accelerator_section_interest_categories` ADD CONSTRAINT `interestcategory_id_caa54dd3_fk_accelerator_interestcategory_id` FOREIGN KEY (`interestcategory_id`) REFERENCES `accelerator_interestcategory` (`id`);
ALTER TABLE `accelerator_section_interest_categories` ADD CONSTRAINT `accelerator_section_interest_categories_section_id_a8f4a518_uniq` UNIQUE (`section_id`, `interestcategory_id`);
ALTER TABLE `accelerator_siteprogramauthorization` ADD CONSTRAINT `accelerator_sitepr_program_id_4786621d_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_siteprogramauthorization` ADD CONSTRAINT `accelerator_siteprograma_site_id_fb8dbeba_fk_accelerator_site_id` FOREIGN KEY (`site_id`) REFERENCES `accelerator_site` (`id`);
ALTER TABLE `accelerator_startupattribute` ADD CONSTRAINT `attribute_id_52e1a312_fk_accelerator_programstartupattribute_id` FOREIGN KEY (`attribute_id`) REFERENCES `accelerator_programstartupattribute` (`id`);
ALTER TABLE `accelerator_startupattribute` ADD CONSTRAINT `accelerator_startu_startup_id_647793cd_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startupcycleinterest` ADD CONSTRAINT `accelerator_sta_cycle_id_5b5fb5ec_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
ALTER TABLE `accelerator_startupmentorrelationship` ADD CONSTRAINT `accelerator_startupmentorrela_mentor_id_1a46af5e_fk_auth_user_id` FOREIGN KEY (`mentor_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_startupmentortrackingrecord` ADD CONSTRAINT `accelerator_startu_program_id_934066e4_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_startupmentortrackingrecord` ADD CONSTRAINT `accelerator_startu_startup_id_2ccec7c6_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startupoverridegrant` ADD CONSTRAINT `a_program_override_id_22bcfce3_fk_accelerator_programoverride_id` FOREIGN KEY (`program_override_id`) REFERENCES `accelerator_programoverride` (`id`);
ALTER TABLE `accelerator_startupoverridegrant` ADD CONSTRAINT `accelerator_startu_startup_id_6ebf355a_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startupprograminterest` ADD CONSTRAINT `accelerator_startu_program_id_958ea568_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `accelerator_startupprograminterest` ADD CONSTRAINT `accelerator_startu_startup_id_5739e1f2_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startupprograminterest` ADD CONSTRAINT `D367c025886bd8ad074610720e7d9a0f` FOREIGN KEY (`startup_cycle_interest_id`) REFERENCES `accelerator_startupcycleinterest` (`id`);
CREATE INDEX `accelerator_startupprograminterest_70a17ffa` ON `accelerator_startupprograminterest` (`order`);
ALTER TABLE `accelerator_startupstatus` ADD CONSTRAINT `badb878861b20ff99252ece038236120` FOREIGN KEY (`program_startup_status_id`) REFERENCES `accelerator_programstartupstatus` (`id`);
ALTER TABLE `accelerator_startupstatus` ADD CONSTRAINT `accelerator_startu_startup_id_89b7a36b_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startupteammember` ADD CONSTRAINT `accelerator_startu_startup_id_e9a95802_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_startupteammember` ADD CONSTRAINT `accelerator_startupteammember_user_id_2a4bf06c_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_startupteammember_recommendation_tags` ADD CONSTRAINT `d8492bb29042c620a729fe91aadcad09` FOREIGN KEY (`startupteammember_id`) REFERENCES `accelerator_startupteammember` (`id`);
ALTER TABLE `accelerator_startupteammember_recommendation_tags` ADD CONSTRAINT `D5988efc189eb9d51ed24a44e2f4104c` FOREIGN KEY (`recommendationtag_id`) REFERENCES `accelerator_recommendationtag` (`id`);
ALTER TABLE `accelerator_startupteammember_recommendation_tags` ADD CONSTRAINT `accelerator_startupteammember_startupteammember_id_ee715769_uniq` UNIQUE (`startupteammember_id`, `recommendationtag_id`);
ALTER TABLE `accelerator_userlabel_users` ADD CONSTRAINT `accelerator_us_userlabel_id_0f5b3bc8_fk_accelerator_userlabel_id` FOREIGN KEY (`userlabel_id`) REFERENCES `accelerator_userlabel` (`id`);
ALTER TABLE `accelerator_userlabel_users` ADD CONSTRAINT `accelerator_userlabel_users_user_id_ca08396f_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_userlabel_users` ADD CONSTRAINT `accelerator_userlabel_users_userlabel_id_2ce6de54_uniq` UNIQUE (`userlabel_id`, `user_id`);
ALTER TABLE `accelerator_paypalpayment` ADD CONSTRAINT `accelerator_pay_cycle_id_983d4615_fk_accelerator_programcycle_id` FOREIGN KEY (`cycle_id`) REFERENCES `accelerator_programcycle` (`id`);
ALTER TABLE `accelerator_paypalpayment` ADD CONSTRAINT `accelerator_paypal_startup_id_219895ec_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
ALTER TABLE `accelerator_baseprofile` ADD CONSTRAINT `accelerator_baseprofile_user_id_ae20d832_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_reference` ADD CONSTRAINT `accelerato_application_id_6f6628e1_fk_accelerator_application_id` FOREIGN KEY (`application_id`) REFERENCES `accelerator_application` (`id`);
ALTER TABLE `accelerator_reference` ADD CONSTRAINT `accelerator_referenc_requesting_user_id_1b81a238_fk_auth_user_id` FOREIGN KEY (`requesting_user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `pagetype_accelerator_userrolemenu` ADD CONSTRAINT `pagetype_acce_urlnode_ptr_id_1aa1b4b8_fk_fluent_pages_urlnode_id` FOREIGN KEY (`urlnode_ptr_id`) REFERENCES `fluent_pages_urlnode` (`id`);
ALTER TABLE `pagetype_accelerator_userrolemenu` ADD CONSTRAINT `pagetype_accelerat_program_id_5b872aec_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
ALTER TABLE `pagetype_accelerator_userrolemenu` ADD CONSTRAINT `paget_program_family_id_394089ba_fk_accelerator_programfamily_id` FOREIGN KEY (`program_family_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `pagetype_accelerator_userrolemenu` ADD CONSTRAINT `pagetype_accele_user_role_id_c9d2ef19_fk_accelerator_userrole_id` FOREIGN KEY (`user_role_id`) REFERENCES `accelerator_userrole` (`id`);
ALTER TABLE `pagetype_accelerator_categoryheaderpage` ADD CONSTRAINT `pagetype_acce_urlnode_ptr_id_f671351e_fk_fluent_pages_urlnode_id` FOREIGN KEY (`urlnode_ptr_id`) REFERENCES `fluent_pages_urlnode` (`id`);
ALTER TABLE `pagetype_accelerator_filepage` ADD CONSTRAINT `pagetype_acce_urlnode_ptr_id_2de9f027_fk_fluent_pages_urlnode_id` FOREIGN KEY (`urlnode_ptr_id`) REFERENCES `fluent_pages_urlnode` (`id`);
ALTER TABLE `accelerator_nodepublishedfor` ADD CONSTRAINT `accelerator_nodepubl_node_id_85421ea1_fk_fluent_pages_urlnode_id` FOREIGN KEY (`node_id`) REFERENCES `fluent_pages_urlnode` (`id`);
ALTER TABLE `accelerator_nodepublishedfor` ADD CONSTRAINT `accelera_published_for_id_f2a320f1_fk_accelerator_programrole_id` FOREIGN KEY (`published_for_id`) REFERENCES `accelerator_programrole` (`id`);
ALTER TABLE `accelerator_expertinterest` ADD CONSTRAINT `a_interest_type_id_4d5bcc31_fk_accelerator_expertinteresttype_id` FOREIGN KEY (`interest_type_id`) REFERENCES `accelerator_expertinteresttype` (`id`);
ALTER TABLE `accelerator_expertinterest` ADD CONSTRAINT `accel_program_family_id_ffc7a168_fk_accelerator_programfamily_id` FOREIGN KEY (`program_family_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `accelerator_expertinterest` ADD CONSTRAINT `accelerator_expertinterest_user_id_353b4949_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `pagetype_accelerator_siteredirectpage` ADD CONSTRAINT `pagetype_acce_urlnode_ptr_id_2ab229ad_fk_fluent_pages_urlnode_id` FOREIGN KEY (`urlnode_ptr_id`) REFERENCES `fluent_pages_urlnode` (`id`);
CREATE INDEX `accelerator_startupmentorrelationship_48222c2b` ON `accelerator_startupmentorrelationship` (`startup_mentor_tracking_id`);
ALTER TABLE `accelerator_startupmentorrelationship` ADD CONSTRAINT `bf7ebdd899654107db7c30d7987754a0` FOREIGN KEY (`startup_mentor_tracking_id`) REFERENCES `accelerator_startupmentortrackingrecord` (`id`);
CREATE INDEX `accelerator_startupcycleinterest_99f77c8c` ON `accelerator_startupcycleinterest` (`startup_id`);
ALTER TABLE `accelerator_startupcycleinterest` ADD CONSTRAINT `accelerator_startu_startup_id_832e7a62_fk_accelerator_startup_id` FOREIGN KEY (`startup_id`) REFERENCES `accelerator_startup` (`id`);
CREATE INDEX `accelerator_scenario_0cc25dbd` ON `accelerator_scenario` (`judging_round_id`);
ALTER TABLE `accelerator_scenario` ADD CONSTRAINT `acceler_judging_round_id_0cb4e507_fk_accelerator_judginground_id` FOREIGN KEY (`judging_round_id`) REFERENCES `accelerator_judginground` (`id`);
CREATE INDEX `accelerator_programstartupstatus_5f4af245` ON `accelerator_programstartupstatus` (`startup_role_id`);
ALTER TABLE `accelerator_programstartupstatus` ADD CONSTRAINT `accelerat_startup_role_id_158d0bd0_fk_accelerator_startuprole_id` FOREIGN KEY (`startup_role_id`) REFERENCES `accelerator_startuprole` (`id`);
CREATE INDEX `accelerator_programrole_75df8002` ON `accelerator_programrole` (`user_label_id`);
ALTER TABLE `accelerator_programrole` ADD CONSTRAINT `accelerator_p_user_label_id_3e80edbf_fk_accelerator_userlabel_id` FOREIGN KEY (`user_label_id`) REFERENCES `accelerator_userlabel` (`id`);
CREATE INDEX `accelerator_programrole_1728abaf` ON `accelerator_programrole` (`user_role_id`);
ALTER TABLE `accelerator_programrole` ADD CONSTRAINT `accelerator_pro_user_role_id_9fd14dba_fk_accelerator_userrole_id` FOREIGN KEY (`user_role_id`) REFERENCES `accelerator_userrole` (`id`);
CREATE INDEX `accelerator_programpartner_19564e43` ON `accelerator_programpartner` (`partner_type_id`);
ALTER TABLE `accelerator_programpartner` ADD CONSTRAINT `ac_partner_type_id_a7b86b33_fk_accelerator_programpartnertype_id` FOREIGN KEY (`partner_type_id`) REFERENCES `accelerator_programpartnertype` (`id`);
CREATE INDEX `accelerator_programpartner_429b1823` ON `accelerator_programpartner` (`program_id`);
ALTER TABLE `accelerator_programpartner` ADD CONSTRAINT `accelerator_progra_program_id_657d8b49_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
CREATE INDEX `accelerator_paypalrefund_376ebbba` ON `accelerator_paypalrefund` (`payment_id`);
ALTER TABLE `accelerator_paypalrefund` ADD CONSTRAINT `accelerator__payment_id_5b3c6256_fk_accelerator_paypalpayment_id` FOREIGN KEY (`payment_id`) REFERENCES `accelerator_paypalpayment` (`id`);
CREATE INDEX `accelerator_panel_e274a5da` ON `accelerator_panel` (`location_id`);
ALTER TABLE `accelerator_panel` ADD CONSTRAINT `accel_location_id_aefab2c7_fk_accelerator_panellocation_location` FOREIGN KEY (`location_id`) REFERENCES `accelerator_panellocation` (`location`);
CREATE INDEX `accelerator_panel_91d978f0` ON `accelerator_panel` (`panel_time_id`);
ALTER TABLE `accelerator_panel` ADD CONSTRAINT `accelerator_p_panel_time_id_018a9354_fk_accelerator_paneltime_id` FOREIGN KEY (`panel_time_id`) REFERENCES `accelerator_paneltime` (`id`);
CREATE INDEX `accelerator_panel_17ddce3a` ON `accelerator_panel` (`panel_type_id`);
ALTER TABLE `accelerator_panel` ADD CONSTRAINT `accel_panel_type_id_37f529bf_fk_accelerator_paneltype_panel_type` FOREIGN KEY (`panel_type_id`) REFERENCES `accelerator_paneltype` (`panel_type`);
ALTER TABLE `accelerator_observer_newsletter_cc_roles` ADD CONSTRAINT `accelerator_obse_observer_id_97dea6d8_fk_accelerator_observer_id` FOREIGN KEY (`observer_id`) REFERENCES `accelerator_observer` (`id`);
ALTER TABLE `accelerator_observer_newsletter_cc_roles` ADD CONSTRAINT `accelerato_programrole_id_8748a2f7_fk_accelerator_programrole_id` FOREIGN KEY (`programrole_id`) REFERENCES `accelerator_programrole` (`id`);
ALTER TABLE `accelerator_observer_newsletter_cc_roles` ADD CONSTRAINT `accelerator_observer_newsletter_cc_rol_observer_id_0245f832_uniq` UNIQUE (`observer_id`, `programrole_id`);
ALTER TABLE `accelerator_newsletter_recipient_roles` ADD CONSTRAINT `accelerator__newsletter_id_b0aa837c_fk_accelerator_newsletter_id` FOREIGN KEY (`newsletter_id`) REFERENCES `accelerator_newsletter` (`id`);
ALTER TABLE `accelerator_newsletter_recipient_roles` ADD CONSTRAINT `accelerato_programrole_id_7ba63ded_fk_accelerator_programrole_id` FOREIGN KEY (`programrole_id`) REFERENCES `accelerator_programrole` (`id`);
ALTER TABLE `accelerator_newsletter_recipient_roles` ADD CONSTRAINT `accelerator_newsletter_recipient_rol_newsletter_id_b296f57f_uniq` UNIQUE (`newsletter_id`, `programrole_id`);
CREATE INDEX `accelerator_judginground_bdf8c73e` ON `accelerator_judginground` (`confirmed_judge_label_id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `ac_confirmed_judge_label_id_393a4487_fk_accelerator_userlabel_id` FOREIGN KEY (`confirmed_judge_label_id`) REFERENCES `accelerator_userlabel` (`id`);
CREATE INDEX `accelerator_judginground_413c41b4` ON `accelerator_judginground` (`desired_judge_label_id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `acce_desired_judge_label_id_cbb6f66e_fk_accelerator_userlabel_id` FOREIGN KEY (`desired_judge_label_id`) REFERENCES `accelerator_userlabel` (`id`);
CREATE INDEX `accelerator_judginground_b47c34bd` ON `accelerator_judginground` (`feedback_merge_with_id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `a_feedback_merge_with_id_e91a44d8_fk_accelerator_judginground_id` FOREIGN KEY (`feedback_merge_with_id`) REFERENCES `accelerator_judginground` (`id`);
CREATE INDEX `accelerator_judginground_f8390639` ON `accelerator_judginground` (`judging_form_id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `accelerat_judging_form_id_49398283_fk_accelerator_judgingform_id` FOREIGN KEY (`judging_form_id`) REFERENCES `accelerator_judgingform` (`id`);
CREATE INDEX `accelerator_judginground_429b1823` ON `accelerator_judginground` (`program_id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `accelerator_judgin_program_id_cf976c74_fk_accelerator_program_id` FOREIGN KEY (`program_id`) REFERENCES `accelerator_program` (`id`);
CREATE INDEX `accelerator_judginground_5926436d` ON `accelerator_judginground` (`startup_label_id`);
ALTER TABLE `accelerator_judginground` ADD CONSTRAINT `acceler_startup_label_id_a26368b5_fk_accelerator_startuplabel_id` FOREIGN KEY (`startup_label_id`) REFERENCES `accelerator_startuplabel` (`id`);
CREATE INDEX `accelerator_judgeroundcommitment_0cc25dbd` ON `accelerator_judgeroundcommitment` (`judging_round_id`);
ALTER TABLE `accelerator_judgeroundcommitment` ADD CONSTRAINT `acceler_judging_round_id_3f385840_fk_accelerator_judginground_id` FOREIGN KEY (`judging_round_id`) REFERENCES `accelerator_judginground` (`id`);
CREATE INDEX `accelerator_judgepanelassignment_3be65887` ON `accelerator_judgepanelassignment` (`panel_id`);
ALTER TABLE `accelerator_judgepanelassignment` ADD CONSTRAINT `accelerator_judgepanel_panel_id_c20f50b2_fk_accelerator_panel_id` FOREIGN KEY (`panel_id`) REFERENCES `accelerator_panel` (`id`);
CREATE INDEX `accelerator_judgepanelassignment_adc0676c` ON `accelerator_judgepanelassignment` (`scenario_id`);
ALTER TABLE `accelerator_judgepanelassignment` ADD CONSTRAINT `accelerator_judg_scenario_id_1fcbf62a_fk_accelerator_scenario_id` FOREIGN KEY (`scenario_id`) REFERENCES `accelerator_scenario` (`id`);
CREATE INDEX `accelerator_judgefeedbackcomponent_f5009aa9` ON `accelerator_judgefeedbackcomponent` (`feedback_element_id`);
ALTER TABLE `accelerator_judgefeedbackcomponent` ADD CONSTRAINT `D9e0a7f8a0ac0c537099efffd5773a00` FOREIGN KEY (`feedback_element_id`) REFERENCES `accelerator_judgingformelement` (`id`);
CREATE INDEX `accelerator_judgefeedbackcomponent_7aad45f7` ON `accelerator_judgefeedbackcomponent` (`judge_feedback_id`);
ALTER TABLE `accelerator_judgefeedbackcomponent` ADD CONSTRAINT `dbe823f8b23409e28475c190848039c8` FOREIGN KEY (`judge_feedback_id`) REFERENCES `accelerator_judgeapplicationfeedback` (`id`);
CREATE INDEX `accelerator_judgeavailability_065ade21` ON `accelerator_judgeavailability` (`commitment_id`);
ALTER TABLE `accelerator_judgeavailability` ADD CONSTRAINT `ac_commitment_id_967c5406_fk_accelerator_judgeroundcommitment_id` FOREIGN KEY (`commitment_id`) REFERENCES `accelerator_judgeroundcommitment` (`id`);
CREATE INDEX `accelerator_judgeavailability_94d8985c` ON `accelerator_judgeavailability` (`panel_location_id`);
ALTER TABLE `accelerator_judgeavailability` ADD CONSTRAINT `D3aea853e5c1d5c05d6a1c4c1fc4ef77` FOREIGN KEY (`panel_location_id`) REFERENCES `accelerator_panellocation` (`location`);
CREATE INDEX `accelerator_judgeavailability_91d978f0` ON `accelerator_judgeavailability` (`panel_time_id`);
ALTER TABLE `accelerator_judgeavailability` ADD CONSTRAINT `accelerator_j_panel_time_id_3ced8165_fk_accelerator_paneltime_id` FOREIGN KEY (`panel_time_id`) REFERENCES `accelerator_paneltime` (`id`);
CREATE INDEX `accelerator_judgeavailability_17ddce3a` ON `accelerator_judgeavailability` (`panel_type_id`);
ALTER TABLE `accelerator_judgeavailability` ADD CONSTRAINT `accel_panel_type_id_94b4a433_fk_accelerator_paneltype_panel_type` FOREIGN KEY (`panel_type_id`) REFERENCES `accelerator_paneltype` (`panel_type`);
CREATE INDEX `accelerator_judgeapplicationfeedback_71f5cb07` ON `accelerator_judgeapplicationfeedback` (`form_type_id`);
ALTER TABLE `accelerator_judgeapplicationfeedback` ADD CONSTRAINT `accelerator__form_type_id_6472e1e3_fk_accelerator_judgingform_id` FOREIGN KEY (`form_type_id`) REFERENCES `accelerator_judgingform` (`id`);
CREATE INDEX `accelerator_judgeapplicationfeedback_e7c5d788` ON `accelerator_judgeapplicationfeedback` (`judge_id`);
ALTER TABLE `accelerator_judgeapplicationfeedback` ADD CONSTRAINT `accelerator_judgeapplicationfe_judge_id_75e483da_fk_auth_user_id` FOREIGN KEY (`judge_id`) REFERENCES `auth_user` (`id`);
CREATE INDEX `accelerator_judgeapplicationfeedback_3be65887` ON `accelerator_judgeapplicationfeedback` (`panel_id`);
ALTER TABLE `accelerator_judgeapplicationfeedback` ADD CONSTRAINT `accelerator_judgeappli_panel_id_dcad7a6e_fk_accelerator_panel_id` FOREIGN KEY (`panel_id`) REFERENCES `accelerator_panel` (`id`);
ALTER TABLE `accelerator_judgeapplicationfeedback_viewers` ADD CONSTRAINT `D2bf0309db3230b97596fbde829ae8cd` FOREIGN KEY (`judgeapplicationfeedback_id`) REFERENCES `accelerator_judgeapplicationfeedback` (`id`);
ALTER TABLE `accelerator_judgeapplicationfeedback_viewers` ADD CONSTRAINT `accelerator_judgeapplicationfee_user_id_255141e1_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_judgeapplicationfeedback_viewers` ADD CONSTRAINT `accelerator_judgeappli_judgeapplicationfeedback_id_2764b5b8_uniq` UNIQUE (`judgeapplicationfeedback_id`, `user_id`);
ALTER TABLE `accelerator_expert_related_industry` ADD CONSTRAINT `accele_expertprofile_id_0a74b486_fk_accelerator_expertprofile_id` FOREIGN KEY (`expertprofile_id`) REFERENCES `accelerator_expertprofile` (`id`);
ALTER TABLE `accelerator_expert_related_industry` ADD CONSTRAINT `accelerator_expe_industry_id_50cf2e40_fk_accelerator_industry_id` FOREIGN KEY (`industry_id`) REFERENCES `accelerator_industry` (`id`);
ALTER TABLE `accelerator_expert_related_industry` ADD CONSTRAINT `accelerator_expert_related_indust_expertprofile_id_28efe7d7_uniq` UNIQUE (`expertprofile_id`, `industry_id`);
CREATE INDEX `accelerator_expertprofile_5a48468e` ON `accelerator_expertprofile` (`current_program_id`);
ALTER TABLE `accelerator_expertprofile` ADD CONSTRAINT `accelerato_current_program_id_9121d2a0_fk_accelerator_program_id` FOREIGN KEY (`current_program_id`) REFERENCES `accelerator_program` (`id`);
CREATE INDEX `accelerator_expertprofile_12cb36c5` ON `accelerator_expertprofile` (`expert_category_id`);
ALTER TABLE `accelerator_expertprofile` ADD CONSTRAINT `acc_expert_category_id_7c6886e9_fk_accelerator_expertcategory_id` FOREIGN KEY (`expert_category_id`) REFERENCES `accelerator_expertcategory` (`id`);
ALTER TABLE `accelerator_expertprofile_functional_expertise` ADD CONSTRAINT `accele_expertprofile_id_ad91424f_fk_accelerator_expertprofile_id` FOREIGN KEY (`expertprofile_id`) REFERENCES `accelerator_expertprofile` (`id`);
ALTER TABLE `accelerator_expertprofile_functional_expertise` ADD CONSTRAINT `D12e150412eac92477d20a3b94869047` FOREIGN KEY (`functionalexpertise_id`) REFERENCES `accelerator_functionalexpertise` (`id`);
ALTER TABLE `accelerator_expertprofile_functional_expertise` ADD CONSTRAINT `accelerator_expertprofile_functio_expertprofile_id_390b913c_uniq` UNIQUE (`expertprofile_id`, `functionalexpertise_id`);
CREATE INDEX `accelerator_expertprofile_9459abc0` ON `accelerator_expertprofile` (`home_program_family_id`);
ALTER TABLE `accelerator_expertprofile` ADD CONSTRAINT `home_program_family_id_b7c976e4_fk_accelerator_programfamily_id` FOREIGN KEY (`home_program_family_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `accelerator_expertprofile_interest_categories` ADD CONSTRAINT `accele_expertprofile_id_84634bb0_fk_accelerator_expertprofile_id` FOREIGN KEY (`expertprofile_id`) REFERENCES `accelerator_expertprofile` (`id`);
ALTER TABLE `accelerator_expertprofile_interest_categories` ADD CONSTRAINT `interestcategory_id_09d06a0e_fk_accelerator_interestcategory_id` FOREIGN KEY (`interestcategory_id`) REFERENCES `accelerator_interestcategory` (`id`);
ALTER TABLE `accelerator_expertprofile_interest_categories` ADD CONSTRAINT `accelerator_expertprofile_interes_expertprofile_id_de1dfb97_uniq` UNIQUE (`expertprofile_id`, `interestcategory_id`);
ALTER TABLE `accelerator_expert_related_mentoringspecialty` ADD CONSTRAINT `accele_expertprofile_id_16922be5_fk_accelerator_expertprofile_id` FOREIGN KEY (`expertprofile_id`) REFERENCES `accelerator_expertprofile` (`id`);
ALTER TABLE `accelerator_expert_related_mentoringspecialty` ADD CONSTRAINT `D70f2d4d115e0e77baa958a119c99410` FOREIGN KEY (`mentoringspecialties_id`) REFERENCES `accelerator_mentoringspecialties` (`id`);
ALTER TABLE `accelerator_expert_related_mentoringspecialty` ADD CONSTRAINT `accelerator_expert_related_mentor_expertprofile_id_db6c6808_uniq` UNIQUE (`expertprofile_id`, `mentoringspecialties_id`);
CREATE INDEX `accelerator_expertprofile_575a44eb` ON `accelerator_expertprofile` (`primary_industry_id`);
ALTER TABLE `accelerator_expertprofile` ADD CONSTRAINT `accelera_primary_industry_id_1a6fc9f6_fk_accelerator_industry_id` FOREIGN KEY (`primary_industry_id`) REFERENCES `accelerator_industry` (`id`);
ALTER TABLE `accelerator_expertprofile_program_families` ADD CONSTRAINT `accele_expertprofile_id_b9c10d4e_fk_accelerator_expertprofile_id` FOREIGN KEY (`expertprofile_id`) REFERENCES `accelerator_expertprofile` (`id`);
ALTER TABLE `accelerator_expertprofile_program_families` ADD CONSTRAINT `accele_programfamily_id_9f922f7f_fk_accelerator_programfamily_id` FOREIGN KEY (`programfamily_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `accelerator_expertprofile_program_families` ADD CONSTRAINT `accelerator_expertprofile_program_expertprofile_id_c70161c7_uniq` UNIQUE (`expertprofile_id`, `programfamily_id`);
ALTER TABLE `accelerator_expertprofile_recommendation_tags` ADD CONSTRAINT `accele_expertprofile_id_7e7d12c2_fk_accelerator_expertprofile_id` FOREIGN KEY (`expertprofile_id`) REFERENCES `accelerator_expertprofile` (`id`);
ALTER TABLE `accelerator_expertprofile_recommendation_tags` ADD CONSTRAINT `cb20706c875a5fe579b9f201729e8b63` FOREIGN KEY (`recommendationtag_id`) REFERENCES `accelerator_recommendationtag` (`id`);
ALTER TABLE `accelerator_expertprofile_recommendation_tags` ADD CONSTRAINT `accelerator_expertprofile_recomme_expertprofile_id_b2e5098b_uniq` UNIQUE (`expertprofile_id`, `recommendationtag_id`);
ALTER TABLE `accelerator_expertprofile` ADD CONSTRAINT `accelerator_expertprofile_user_id_486d104f_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_interest_categories` ADD CONSTRAINT `D9b93415cbf5de1b37df10051ad5854a` FOREIGN KEY (`entrepreneurprofile_id`) REFERENCES `accelerator_entrepreneurprofile` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_interest_categories` ADD CONSTRAINT `interestcategory_id_56478ebb_fk_accelerator_interestcategory_id` FOREIGN KEY (`interestcategory_id`) REFERENCES `accelerator_interestcategory` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_interest_categories` ADD CONSTRAINT `accelerator_entrepreneurpro_entrepreneurprofile_id_eed237ef_uniq` UNIQUE (`entrepreneurprofile_id`, `interestcategory_id`);
ALTER TABLE `accelerator_entrepreneurprofile_program_families` ADD CONSTRAINT `b116f475a0c260a87e012292bc9eea92` FOREIGN KEY (`entrepreneurprofile_id`) REFERENCES `accelerator_entrepreneurprofile` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_program_families` ADD CONSTRAINT `accele_programfamily_id_fee3c6bd_fk_accelerator_programfamily_id` FOREIGN KEY (`programfamily_id`) REFERENCES `accelerator_programfamily` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_program_families` ADD CONSTRAINT `accelerator_entrepreneurpro_entrepreneurprofile_id_243c9826_uniq` UNIQUE (`entrepreneurprofile_id`, `programfamily_id`);
ALTER TABLE `accelerator_entrepreneurprofile_recommendation_tags` ADD CONSTRAINT `d5ee3e11824e49cfd87fa37e5ff7c361` FOREIGN KEY (`entrepreneurprofile_id`) REFERENCES `accelerator_entrepreneurprofile` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_recommendation_tags` ADD CONSTRAINT `D7af28cf1ae8688411d3b50eb46e35e8` FOREIGN KEY (`recommendationtag_id`) REFERENCES `accelerator_recommendationtag` (`id`);
ALTER TABLE `accelerator_entrepreneurprofile_recommendation_tags` ADD CONSTRAINT `accelerator_entrepreneurpro_entrepreneurprofile_id_9a0b6272_uniq` UNIQUE (`entrepreneurprofile_id`, `recommendationtag_id`);
ALTER TABLE `accelerator_entrepreneurprofile` ADD CONSTRAINT `accelerator_entrepreneurprofile_user_id_d6ea0f93_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
CREATE INDEX `accelerator_bucketstate_fae0fb83` ON `accelerator_bucketstate` (`program_role_id`);
ALTER TABLE `accelerator_bucketstate` ADD CONSTRAINT `accelerat_program_role_id_da53e747_fk_accelerator_programrole_id` FOREIGN KEY (`program_role_id`) REFERENCES `accelerator_programrole` (`id`);
CREATE INDEX `accelerator_applicationpanelassignment_3be65887` ON `accelerator_applicationpanelassignment` (`panel_id`);
ALTER TABLE `accelerator_applicationpanelassignment` ADD CONSTRAINT `accelerator_applicatio_panel_id_1027242b_fk_accelerator_panel_id` FOREIGN KEY (`panel_id`) REFERENCES `accelerator_panel` (`id`);
CREATE INDEX `accelerator_applicationpanelassignment_adc0676c` ON `accelerator_applicationpanelassignment` (`scenario_id`);
ALTER TABLE `accelerator_applicationpanelassignment` ADD CONSTRAINT `accelerator_appl_scenario_id_af43c058_fk_accelerator_scenario_id` FOREIGN KEY (`scenario_id`) REFERENCES `accelerator_scenario` (`id`);

-- rename mc content types to accelerator
UPDATE `django_content_type`
SET `app_label` = 'accelerator'
WHERE `django_content_type`.`app_label` = 'mc' AND
      `django_content_type`.model NOT IN ('userrolemenu',
                                          'nodepublishedfor',
                                          'categoryheaderpage',
                                          'siteredirectpage',
                                          'filepage');

-- rename mc tables to accelerator
RENAME TABLE
