Private GIT

Skip to content
Snippets Groups Projects
Commit f72299b7 authored by Kevin Duret's avatar Kevin Duret Committed by Matthieu Kermagoret
Browse files

fix(upgrade): move traps_group foreign key recreation at the end of upgrade script

parent fdbd44a5
Branches
Tags
No related merge requests found
......@@ -48,12 +48,6 @@ if (isset($pearDB)) {
" `traps_group_id` INT NOT NULL AUTO_INCREMENT"
);
$pearDB->query(
"ALTER TABLE `traps_group_relation` " .
"ADD CONSTRAINT `traps_group_relation_ibfk_2` " .
"FOREIGN KEY (`traps_group_id`) REFERENCES `traps_group` (`traps_group_id`) ON DELETE CASCADE"
);
$pearDB->query(
"ALTER TABLE `traps_group` ADD PRIMARY KEY (`traps_group_id`)"
);
......@@ -63,5 +57,10 @@ if (isset($pearDB)) {
" DROP KEY `traps_group_id`"
);
$pearDB->query(
"ALTER TABLE `traps_group_relation` " .
"ADD CONSTRAINT `traps_group_relation_ibfk_2` " .
"FOREIGN KEY (`traps_group_id`) REFERENCES `traps_group` (`traps_group_id`) ON DELETE CASCADE"
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment