{"id":1526,"date":"2022-11-10T22:37:10","date_gmt":"2022-11-10T22:37:10","guid":{"rendered":"\/blog\/?p=1526"},"modified":"2022-11-10T22:37:11","modified_gmt":"2022-11-10T22:37:11","slug":"mysql-add-foreign-key-for-delete-cascade","status":"publish","type":"post","link":"\/blog\/index.php\/mysql-add-foreign-key-for-delete-cascade\/","title":{"rendered":"mysql add foreign key for delete cascade"},"content":{"rendered":"\n<p>This one adds a constraint to the orderdetails table such as if the order is deleted, its details get deleted too<\/p>\n\n\n\n<p><code>ALTER TABLE pedidos_detalle add constraint foreign key(folio) references pedidos(folio) on delete cascade<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This one adds a constraint to the orderdetails table such as if the order is deleted, its details get deleted too ALTER TABLE pedidos_detalle add constraint foreign key(folio) references pedidos(folio) on delete cascade<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1526","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1526"}],"version-history":[{"count":1,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1526\/revisions"}],"predecessor-version":[{"id":1528,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1526\/revisions\/1528"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1526"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}