mysql...
This commit is contained in:
parent
c41378f0b9
commit
0e660f5aba
@ -111,7 +111,7 @@ class CommentList extends Extension
|
|||||||
image_id INTEGER NOT NULL,
|
image_id INTEGER NOT NULL,
|
||||||
owner_id INTEGER NOT NULL,
|
owner_id INTEGER NOT NULL,
|
||||||
owner_ip SCORE_INET NOT NULL,
|
owner_ip SCORE_INET NOT NULL,
|
||||||
posted TIMESTAMP DEFAULT NULL,
|
posted TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
comment TEXT NOT NULL,
|
comment TEXT NOT NULL,
|
||||||
FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE,
|
FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE RESTRICT
|
FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE RESTRICT
|
||||||
@ -129,7 +129,7 @@ class CommentList extends Extension
|
|||||||
image_id INTEGER NOT NULL,
|
image_id INTEGER NOT NULL,
|
||||||
owner_id INTEGER NOT NULL,
|
owner_id INTEGER NOT NULL,
|
||||||
owner_ip CHAR(16) NOT NULL,
|
owner_ip CHAR(16) NOT NULL,
|
||||||
posted TIMESTAMP DEFAULT NULL,
|
posted TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
comment TEXT NOT NULL
|
comment TEXT NOT NULL
|
||||||
");
|
");
|
||||||
$database->execute("CREATE INDEX comments_image_id_idx ON comments(image_id)", []);
|
$database->execute("CREATE INDEX comments_image_id_idx ON comments(image_id)", []);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user