Files
mtusi2026lab7/db/migrations/002_idempotency.sql
T
sashadugina06 11390b65fd
Skeleton contracts / contracts (pull_request) Blocked by required conditions
feat: complete lab 7 for grade 4
2026-12-04 13:55:32 +03:00

10 lines
326 B
SQL

CREATE TABLE message_requests (
chat_id UUID NOT NULL REFERENCES chats(id),
sender_id UUID NOT NULL REFERENCES users(id),
key VARCHAR(128) NOT NULL,
text TEXT NOT NULL,
message_id UUID REFERENCES messages(id),
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (chat_id, sender_id, key)
);