add threads n posts

This commit is contained in:
2025-05-18 17:55:03 +03:00
parent f5485702a8
commit 4039d6d299
7 changed files with 182 additions and 2 deletions

View File

@ -41,4 +41,11 @@ return {
-- will appear on top of non-stickied threads in topic view
schema.add_column("threads", "is_stickied", "BOOLEAN DEFAULT FALSE")
end,
[5] = function ()
db.query("CREATE INDEX idx_posts_thread ON posts(thread_id, created_at, id)")
db.query("CREATE INDEX idx_users_avatar ON users(avatar_id)")
db.query("CREATE INDEX idx_topics_slug ON topics(slug)")
db.query("CREATE INDEX idx_threads_slug ON threads(slug)")
end,
}