feat: add private S3 attachments and safe reconciliation

This commit is contained in:
Vladislav Agapov
2026-10-29 16:27:20 +03:00
parent ec540a1a72
commit aca4c4eea9
217 changed files with 15042 additions and 44 deletions
@@ -0,0 +1,9 @@
CREATE TABLE message_idempotency (
user_id uuid NOT NULL REFERENCES users(id),
chat_id uuid NOT NULL REFERENCES chats(id),
key text NOT NULL,
message_id uuid NOT NULL REFERENCES messages(id),
expires_at timestamptz NOT NULL,
PRIMARY KEY (user_id,chat_id,key)
);
CREATE INDEX message_idempotency_expiry ON message_idempotency(expires_at);