mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
Merge remote-tracking branch 'origin/main' into feat/pulse-hourly-mean-complete
This commit is contained in:
commit
13b8920dd5
88 files changed
+5627
-772
No files matched your search
@@ -0,0 +1,8 @@
|
||||
-- What request a replay-cache cell answered, as a SHA-256 of the canonical
|
||||
-- request body scoped by method and path. A request that reuses a key with a
|
||||
-- different body is executed instead of being handed the first body's cached
|
||||
-- response. The body itself is never stored. Nullable: rows written before
|
||||
-- this release carry none, and a null never matches, so they stop replaying
|
||||
-- for anything but their own retries already in flight (they expire within
|
||||
-- 24 hours either way).
|
||||
ALTER TABLE "idempotency_keys" ADD COLUMN IF NOT EXISTS "request_fingerprint" TEXT;
|
||||
+13
-9
@@ -5545,15 +5545,19 @@ model ProviderHealth {
|
||||
/// (userId, key, method, path) so retries within the TTL replay the
|
||||
/// original outcome instead of producing a duplicate side-effect.
|
||||
model IdempotencyKey {
|
||||
id String @id @default(cuid())
|
||||
userId String @map("user_id")
|
||||
key String
|
||||
method String
|
||||
path String
|
||||
responseStatus Int @map("response_status")
|
||||
responseBody String @map("response_body") // serialized JSON envelope
|
||||
expiresAt DateTime @map("expires_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
id String @id @default(cuid())
|
||||
userId String @map("user_id")
|
||||
key String
|
||||
method String
|
||||
path String
|
||||
responseStatus Int @map("response_status")
|
||||
responseBody String @map("response_body") // serialized JSON envelope
|
||||
/// SHA-256 of the canonical request body, scoped by method and path. A
|
||||
/// lookup replays only when it matches; a different body under the same key
|
||||
/// runs normally. Null on rows written before it existed, which never match.
|
||||
requestFingerprint String? @map("request_fingerprint")
|
||||
expiresAt DateTime @map("expires_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
||||
Reference in new issue
Block a user