notes FKs
This commit is contained in:
parent
9f4c5c1d93
commit
8b69e056b4
@ -27,6 +27,7 @@ class Notes extends Extension {
|
|||||||
width INTEGER NOT NULL,
|
width INTEGER NOT NULL,
|
||||||
note TEXT NOT NULL,
|
note TEXT NOT NULL,
|
||||||
INDEX (image_id),
|
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
|
FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE
|
||||||
");
|
");
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ class Notes extends Extension {
|
|||||||
user_id INTEGER NOT NULL,
|
user_id INTEGER NOT NULL,
|
||||||
date DATETIME NOT NULL,
|
date DATETIME NOT NULL,
|
||||||
INDEX (image_id),
|
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
|
FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE
|
||||||
");
|
");
|
||||||
|
|
||||||
@ -54,6 +56,7 @@ class Notes extends Extension {
|
|||||||
width INTEGER NOT NULL,
|
width INTEGER NOT NULL,
|
||||||
note TEXT NOT NULL,
|
note TEXT NOT NULL,
|
||||||
INDEX (image_id),
|
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
|
FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE
|
||||||
");
|
");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user