summaryrefslogtreecommitdiffhomepage
path: root/apioforum/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'apioforum/db.py')
-rw-r--r--apioforum/db.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/apioforum/db.py b/apioforum/db.py
index 31eb8ef..9db27db 100644
--- a/apioforum/db.py
+++ b/apioforum/db.py
@@ -37,8 +37,9 @@ CREATE TABLE posts (
content TEXT,
thread INTEGER NOT NULL REFERENCES threads(id),
author TEXT NOT NULL REFERENCES users(username),
- idx INTEGER NOT NULL
+ created TIMESTAMP NOT NULL
);
+
CREATE INDEX posts_thread_idx ON posts (thread);
""",
]