Перенес изменения

This commit is contained in:
Grbisba
2026-11-13 11:22:22 +03:00
parent 276dbdad8a
commit ce035c8528
122 changed files with 9357 additions and 28 deletions
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS chat_members
(
chat_id UUID NOT NULL,
user_id UUID NOT NULL,
PRIMARY KEY (chat_id, user_id),
CONSTRAINT chat_members_chat_fk FOREIGN KEY (chat_id) REFERENCES chats (id) ON DELETE NO ACTION,
CONSTRAINT chat_members_user_fk FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE NO ACTION
);
CREATE INDEX IF NOT EXISTS idx_chat_members_user_id_chat_id ON chat_members (user_id, chat_id);
---- create above / drop below ----
DROP TABLE IF EXISTS chat_members;