Мессенджер с Postgres, Redis, Valkey

This commit is contained in:
Queenfish
2026-10-08 13:21:48 +03:00
parent 65003b6119
commit 6bfbcf74fc
41 changed files with 2624 additions and 24 deletions
+7
View File
@@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS messages (
id UUID PRIMARY KEY,
chat_id UUID NOT NULL REFERENCES chats(id) ON DELETE CASCADE,
sender_id UUID NOT NULL REFERENCES users(id),
text TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);