@campus-labs/prisma-client 0.17.1 → 0.18.1
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/package.json +1 -1
- package/prisma/schema.prisma +9 -4
- package/prisma/seed2.ts +0 -3044
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -675,15 +675,18 @@ model projects {
|
|
|
675
675
|
version Int @default(1)
|
|
676
676
|
current_state Json
|
|
677
677
|
repository_ai_badges Json[]
|
|
678
|
+
head_patch_id Int? @unique
|
|
678
679
|
initiatives initiatives[]
|
|
679
680
|
patches patches[]
|
|
680
681
|
|
|
681
|
-
authors
|
|
682
|
-
editors
|
|
683
|
-
snapshots
|
|
682
|
+
authors users @relation("ProjectAuthor", fields: [author_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
683
|
+
editors users? @relation("ProjectEditor", fields: [editor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
684
|
+
snapshots snapshots[]
|
|
685
|
+
head_patch patches? @relation("ProjectHead", fields: [head_patch_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
684
686
|
|
|
685
687
|
@@index([author_id], map: "idx_projects_author")
|
|
686
688
|
@@index([editor_id], map: "idx_projects_designer")
|
|
689
|
+
@@index([head_patch_id], map: "idx_projects_head_patch")
|
|
687
690
|
}
|
|
688
691
|
|
|
689
692
|
model patches {
|
|
@@ -698,8 +701,10 @@ model patches {
|
|
|
698
701
|
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
699
702
|
updated_at DateTime @default(now()) @db.Timestamp(6)
|
|
700
703
|
deleted_at DateTime? @db.Timestamp(6)
|
|
704
|
+
origin String @default("DRAFT") @db.VarChar(20)
|
|
701
705
|
|
|
702
|
-
projects
|
|
706
|
+
projects projects @relation(fields: [project_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
707
|
+
head_of projects? @relation("ProjectHead")
|
|
703
708
|
|
|
704
709
|
@@index([project_id], map: "idx_patches_project")
|
|
705
710
|
}
|