From 159e10030b59ae904cea586fd5da5f2e55ec96ad Mon Sep 17 00:00:00 2001 From: Matt N Date: Fri, 16 Sep 2016 05:40:39 -0700 Subject: Include table prefix in foreign key names to avoid conflicts (#859) --- app/Module/FamilyTreeNews/Schema/Migration2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Module/FamilyTreeNews/Schema') diff --git a/app/Module/FamilyTreeNews/Schema/Migration2.php b/app/Module/FamilyTreeNews/Schema/Migration2.php index 7e1a4efe93..d962c0feee 100644 --- a/app/Module/FamilyTreeNews/Schema/Migration2.php +++ b/app/Module/FamilyTreeNews/Schema/Migration2.php @@ -36,8 +36,8 @@ class Migration2 implements MigrationInterface { try { Database::exec( "ALTER TABLE `##news`" . - " ADD FOREIGN KEY news_fk1 (user_id ) REFERENCES `##user` (user_id) ON DELETE CASCADE," . - " ADD FOREIGN KEY news_fk2 (gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE" + " ADD FOREIGN KEY `##news_fk1` (user_id ) REFERENCES `##user` (user_id) ON DELETE CASCADE," . + " ADD FOREIGN KEY `##news_fk2` (gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE" ); } catch (PDOException $ex) { // Already updated? -- cgit v1.3