create table idempotency_keys ( user_id uuid not null references users(id) on delete cascade, method text not null, path text not null, key text not null, body_hash text not null, response jsonb not null, created_at timestamptz not null, primary key (user_id, method, path, key) );