Drop SCORE_DATETIME/NOW - all the databases we care about now support TIMESTAMP/CURRENT_TIMESTAMP

This commit is contained in:
Shish
2019-11-03 18:28:05 +00:00
parent 1210498e41
commit 6bc33ee691
16 changed files with 33 additions and 40 deletions

View File

@ -21,8 +21,8 @@ class Forum extends Extension
sticky SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N,
title VARCHAR(255) NOT NULL,
user_id INTEGER NOT NULL,
date SCORE_DATETIME NOT NULL,
uptodate SCORE_DATETIME NOT NULL,
date TIMESTAMP NOT NULL,
uptodate TIMESTAMP NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE RESTRICT
");
$database->execute("CREATE INDEX forum_threads_date_idx ON forum_threads(date)", []);
@ -31,7 +31,7 @@ class Forum extends Extension
id SCORE_AIPK,
thread_id INTEGER NOT NULL,
user_id INTEGER NOT NULL,
date SCORE_DATETIME NOT NULL,
date TIMESTAMP NOT NULL,
message TEXT,
FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY (thread_id) REFERENCES forum_threads (id) ON UPDATE CASCADE ON DELETE CASCADE