laba 5 mark 4

This commit is contained in:
2026-11-10 14:47:33 +03:00
parent 276dbdad8a
commit 5ca6b6f7ad
75 changed files with 7466 additions and 36 deletions
+12
View File
@@ -0,0 +1,12 @@
CREATE INDEX IF NOT EXISTS messages_keyset_idx
ON messages (chat_id, created_at ASC, id ASC);
CREATE INDEX IF NOT EXISTS chats_keyset_idx
ON chats (created_at ASC, id ASC);
CREATE INDEX IF NOT EXISTS chat_members_user_chat_idx
ON chat_members (user_id, chat_id);
CREATE INDEX IF NOT EXISTS sessions_active_token_idx
ON sessions (token_hash, expires_at)
WHERE revoked_at IS NULL;