First change each table to InnoDB using Table Operations menu
ALTER TABLE `file` ADD FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `method` ADD FOREIGN KEY (`file_id`) REFERENCES `file`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `calls` ADD FOREIGN KEY (`host_method_id`) REFERENCES `method`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `api_call` ADD FOREIGN KEY (`host_method_id`) REFERENCES `method`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `file` ADD FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `method` ADD FOREIGN KEY (`file_id`) REFERENCES `file`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `calls` ADD FOREIGN KEY (`host_method_id`) REFERENCES `method`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `api_call` ADD FOREIGN KEY (`host_method_id`) REFERENCES `method`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
No comments:
Post a Comment