Skip to content

Commit

Permalink
fix issue updating referential integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Zurek committed Feb 4, 2018
1 parent 4abb9d7 commit 7d55ab0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions conf/evolutions/default/109.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ ALTER TABLE `patient_encounters`
DROP FOREIGN KEY `fk_patient_encounter_user_id_users_id_pharm`,
DROP FOREIGN KEY `fk_patient_encounter_user_id_users_id_doc`,
DROP FOREIGN KEY `fk_patient_encounter_user_id_users_id`;
# --- ALTER TABLE `patient_encounters`
# --- DROP INDEX `fk_patient_encounter_user_id_users_id_pharm` ;
ALTER TABLE `patient_encounters`
DROP INDEX `fk_patient_encounter_user_id_users_id_pharm` ;
DROP INDEX `user_id_idx` ;

ALTER TABLE `patient_encounters`
ADD INDEX `fk_patient_encounter_user_id_users_id_nurse_idx` (`user_id_triage` ASC),
Expand Down Expand Up @@ -59,7 +61,11 @@ ADD CONSTRAINT `fk_patient_encounter_user_id_users_id`
ON DELETE NO ACTION
ON UPDATE NO ACTION;

# --- ALTER TABLE `patient_encounters`
# --- DROP INDEX `fk_patient_encounter_user_id_users_id_pharm_idx` ,
# --- ADD INDEX `fk_patient_encounter_user_id_users_id_pharm` (`user_id_triage` ASC);

ALTER TABLE `patient_encounters`
DROP INDEX `fk_patient_encounter_user_id_users_id_pharm_idx` ,
ADD INDEX `fk_patient_encounter_user_id_users_id_pharm` (`user_id_triage` ASC);
ADD INDEX `user_id_idx` (`user_id_triage` ASC);

0 comments on commit 7d55ab0

Please sign in to comment.