infra/sql/0003_idempotency.sql
Metadata
- Purpose: SQL migration or seed data script for persistent storage.
- Domain:
infrastructure - Language:
sql - Bytes: 574
- Lines: 17
- Content hash (short):
58cbd7dd - Source (start): infra/sql/0003_idempotency.sql:1
- Source (end): infra/sql/0003_idempotency.sql:17
Indexed Symbols
No indexed functions/methods detected in this file.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
-- Durable idempotency records for multi-instance gateway behavior.
create table if not exists idempotency_records (
workspace_id uuid not null,
idempotency_key text not null,
route text not null,
method text not null,
status_code integer not null,
response jsonb not null,
created_at timestamptz not null default now(),
expires_at timestamptz not null default (now() + interval '24 hours'),
primary key (workspace_id, idempotency_key, route, method)
);
create index if not exists idx_idempotency_records_expires_at
on idempotency_records(expires_at);