
ALTER TABLE `awcontrollprop`
  ADD CONSTRAINT `c_fk_awcontrollprop_awcontroll_id` FOREIGN KEY (`awcontroll_id`) REFERENCES `awcontroll` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;

--
-- Constraints for table `awrolecontrollprop`
--
ALTER TABLE `awrolecontrollprop`
  ADD CONSTRAINT `c_fk_awrolecontrollprop_controllprop_id` FOREIGN KEY (`controllprop_id`) REFERENCES `awcontrollprop` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
  ADD CONSTRAINT `c_fk_awrolecontrollprop_role_id` FOREIGN KEY (`role_id`) REFERENCES `awrole` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;

--
-- Constraints for table `awrolemenu`
--
ALTER TABLE `awrolemenu`
  ADD CONSTRAINT `c_fk_awrolemenu_menu_id` FOREIGN KEY (`menu_id`) REFERENCES `awmenu` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
  ADD CONSTRAINT `c_fk_awrolemenu_role_id` FOREIGN KEY (`role_id`) REFERENCES `awrole` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;

--
-- Constraints for table `colonoscopy_images`
--
ALTER TABLE `colonoscopy_images`
  ADD CONSTRAINT `c_fk_colonoscopy_images_colonoscopy_id` FOREIGN KEY (`colonoscopy_id`) REFERENCES `colonoscopy` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;
COMMIT;

