@trycompai/db 1.3.11 → 1.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schema.prisma +24 -1
- package/package.json +1 -1
package/dist/schema.prisma
CHANGED
|
@@ -233,6 +233,28 @@ enum EvidenceAutomationTrigger {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
|
|
236
|
+
// ===== automation-version.prisma =====
|
|
237
|
+
model EvidenceAutomationVersion {
|
|
238
|
+
id String @id @default(dbgenerated("generate_prefixed_cuid('eav'::text)"))
|
|
239
|
+
createdAt DateTime @default(now())
|
|
240
|
+
updatedAt DateTime @updatedAt
|
|
241
|
+
|
|
242
|
+
// Relations
|
|
243
|
+
evidenceAutomationId String
|
|
244
|
+
evidenceAutomation EvidenceAutomation @relation(fields: [evidenceAutomationId], references: [id], onDelete: Cascade)
|
|
245
|
+
|
|
246
|
+
// Version details
|
|
247
|
+
version Int // Sequential version number (1, 2, 3...)
|
|
248
|
+
scriptKey String // S3 key for this version's script
|
|
249
|
+
publishedBy String? // User ID who published
|
|
250
|
+
changelog String? // Optional description of changes
|
|
251
|
+
|
|
252
|
+
@@unique([evidenceAutomationId, version])
|
|
253
|
+
@@index([evidenceAutomationId])
|
|
254
|
+
@@index([createdAt])
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
|
236
258
|
// ===== automation.prisma =====
|
|
237
259
|
model EvidenceAutomation {
|
|
238
260
|
id String @id @default(dbgenerated("generate_prefixed_cuid('aut'::text)"))
|
|
@@ -246,7 +268,8 @@ model EvidenceAutomation {
|
|
|
246
268
|
task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
|
247
269
|
|
|
248
270
|
// Relations
|
|
249
|
-
runs
|
|
271
|
+
runs EvidenceAutomationRun[]
|
|
272
|
+
versions EvidenceAutomationVersion[]
|
|
250
273
|
|
|
251
274
|
@@index([taskId])
|
|
252
275
|
}
|