forked from mtusi2026/mtusi2026lab3
9 lines
269 B
SQL
9 lines
269 B
SQL
CREATE TABLE idempotency (
|
|
user_id uuid NOT NULL REFERENCES users(id),
|
|
chat_id uuid NOT NULL REFERENCES chats(id),
|
|
key varchar(128) NOT NULL,
|
|
message_id uuid NOT NULL REFERENCES messages(id),
|
|
expires_at timestamptz NOT NULL,
|
|
PRIMARY KEY(user_id, chat_id, key)
|
|
);
|