From 8b69e056b405b709a6de883c5fb9cbbdbdef3199 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 11 Mar 2012 02:13:18 +0000 Subject: [PATCH] notes FKs --- contrib/notes/main.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/notes/main.php b/contrib/notes/main.php index aa960c1d..5bc09ef6 100644 --- a/contrib/notes/main.php +++ b/contrib/notes/main.php @@ -27,6 +27,7 @@ class Notes extends Extension { width INTEGER NOT NULL, note TEXT NOT NULL, INDEX (image_id), + FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE "); @@ -36,6 +37,7 @@ class Notes extends Extension { user_id INTEGER NOT NULL, date DATETIME NOT NULL, INDEX (image_id), + FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE "); @@ -54,6 +56,7 @@ class Notes extends Extension { width INTEGER NOT NULL, note TEXT NOT NULL, INDEX (image_id), + FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE ");