From: Peter van Dijk Date: Mon, 17 Jun 2013 17:07:32 +0000 (+0200) Subject: sql constraint clarification, thanks Markus Petzsch X-Git-Tag: rec-3.6.0-rc1~652 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=997e9defa5c851c3a439b15fabd6b9d64f3a9dde;p=thirdparty%2Fpdns.git sql constraint clarification, thanks Markus Petzsch --- diff --git a/pdns/docs/pdns.xml b/pdns/docs/pdns.xml index 0cb5ca9036..34792c63a5 100644 --- a/pdns/docs/pdns.xml +++ b/pdns/docs/pdns.xml @@ -16850,6 +16850,11 @@ while(<>) CONSTRAINT `records_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domains` (`id`) ON DELETE CASCADE + + Or, if you have already created the tables, execute: + +ALTER TABLE `records` ADD CONSTRAINT `records_ibfk_1` FOREIGN KEY (`domain_id`) +REFERENCES `domains` (`id`) ON DELETE CASCADE;