Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -77,6 +77,14 @@ enum AppSyncItemStatus {
skipped
}
enum AppEntityBindingState {
active
quarantined
missing
ignored
unlinked
}
/// Global catalog definition of an integratable app (no tenant, no RLS). The
/// `connectionSchema` drives the auto-generated credential form; `connectionType`
/// selects the connect flow. New apps are registered by the build-time adapter
@@ -121,7 +129,8 @@ model DataConnection {
isDemoData Boolean @default(false)
archivedAt DateTime?
syncRuns AppSyncRun[]
syncRuns AppSyncRun[]
entityBindings AppEntityBinding[]
@@index([tenantId, appId, archivedAt])
@@index([tenantId, connectionStatus])
@@ -189,3 +198,33 @@ model AppSyncItem {
@@index([tenantId, entityType, entityId])
@@index([tenantId, externalId])
}
/// Durable provider-neutral identity mapping. AppSyncItem remains the history
/// of one run; this row survives runs, reconnects and process restarts.
model AppEntityBinding {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
tenantId String
dataConnectionId String
externalEntityType String
localEntityType String
externalId String
localId String
state AppEntityBindingState @default(active)
normalizedSnapshot Json
fingerprint String
overwrittenLocalSnapshot Json?
revision Int @default(1)
lastSeenAt DateTime?
lastSyncedAt DateTime?
missingSince DateTime?
unlinkedAt DateTime?
dataConnection DataConnection @relation(fields: [dataConnectionId], references: [id], onDelete: Cascade)
@@unique([tenantId, dataConnectionId, externalEntityType, externalId])
@@unique([tenantId, dataConnectionId, localEntityType, localId])
@@index([tenantId, dataConnectionId, state, lastSyncedAt])
@@index([tenantId, localEntityType, localId, state])
}