aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--apioforum/db.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/apioforum/db.py b/apioforum/db.py
index 024aae9..ad34af3 100644
--- a/apioforum/db.py
+++ b/apioforum/db.py
@@ -270,7 +270,7 @@ CREATE TABLE revisions (
id INTEGER PRIMARY KEY,
author NOT NULL REFERENCES users(username),
content TEXT NOT NULL,
- time TIMESTAMP,
+ time TIMESTAMP NOT NULL,
comment TEXT
);
CREATE TABLE wiki_pages (
@@ -284,7 +284,7 @@ ALTER TABLE role_config ADD COLUMN p_edit_wiki INT NOT NULL DEFAULT 1
""",
"""
INSERT INTO revisions (post, author, content, time)
- SELECT id, author, content, updated FROM posts;
+ SELECT id, author, content, coalesce(updated,created) FROM posts;
""",
]