forked from mtusi2026/mtusi2026lab5
10 lines
313 B
SQL
10 lines
313 B
SQL
CREATE TABLE idempotency_records (
|
|
scope_key TEXT PRIMARY KEY,
|
|
request_hash TEXT NOT NULL,
|
|
message_id UUID NOT NULL REFERENCES messages (id),
|
|
created_at TIMESTAMPTZ NOT NULL,
|
|
expires_at TIMESTAMPTZ NOT NULL
|
|
);
|
|
|
|
CREATE INDEX idempotency_records_expires_idx ON idempotency_records (expires_at);
|