diff --git a/application/migrations/20200819000000_modify_attr_links_constraint.php b/application/migrations/20200819000000_modify_attr_links_constraint.php new file mode 100644 index 000000000..35d2844fa --- /dev/null +++ b/application/migrations/20200819000000_modify_attr_links_constraint.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/application/migrations/sqlscripts/3.3.2_modify_attr_links_constraint.sql b/application/migrations/sqlscripts/3.3.2_modify_attr_links_constraint.sql new file mode 100644 index 000000000..b36b63f0c --- /dev/null +++ b/application/migrations/sqlscripts/3.3.2_modify_attr_links_constraint.sql @@ -0,0 +1,8 @@ +ALTER TABLE `ospos_attribute_links` +DROP FOREIGN KEY `ospos_attribute_links_ibfk_4`; + +ALTER TABLE `ospos_attribute_links` +ADD CONSTRAINT `ospos_attribute_links_ibfk_4` +FOREIGN KEY (`receiving_id`) REFERENCES `ospos_receivings`(`receiving_id`) +ON DELETE CASCADE +ON UPDATE RESTRICT; \ No newline at end of file