@campus-labs/prisma-client 0.12.10 → 0.13.0
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 +28 -0
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -147,6 +147,7 @@ model initiatives {
|
|
|
147
147
|
user_initiative_openings user_initiative_openings[]
|
|
148
148
|
roleUserInitiativeUpdates role_user_initiative_update[]
|
|
149
149
|
feedbackInitiatives feedback_initiative[]
|
|
150
|
+
initiatives_tags initiatives_tags[]
|
|
150
151
|
|
|
151
152
|
@@index([start_date, end_date], map: "idx_initiatives_active")
|
|
152
153
|
@@index([area_id], map: "idx_initiatives_area_active")
|
|
@@ -652,3 +653,30 @@ model snapshots {
|
|
|
652
653
|
|
|
653
654
|
@@index([project_id], map: "idx_snapshots_project")
|
|
654
655
|
}
|
|
656
|
+
|
|
657
|
+
model tags {
|
|
658
|
+
id Int @id @default(autoincrement())
|
|
659
|
+
tag String @unique @db.VarChar(50)
|
|
660
|
+
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
661
|
+
updated_at DateTime @default(now()) @db.Timestamp(6)
|
|
662
|
+
deleted_at DateTime? @db.Timestamp(6)
|
|
663
|
+
|
|
664
|
+
initiatives_tags initiatives_tags[]
|
|
665
|
+
|
|
666
|
+
@@index([tag], map: "idx_tags_tag")
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
model initiatives_tags {
|
|
670
|
+
initiative_id Int
|
|
671
|
+
tag_id Int
|
|
672
|
+
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
673
|
+
updated_at DateTime @default(now()) @db.Timestamp(6)
|
|
674
|
+
deleted_at DateTime? @db.Timestamp(6)
|
|
675
|
+
|
|
676
|
+
initiatives initiatives @relation(fields: [initiative_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
677
|
+
tags tags @relation(fields: [tag_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
678
|
+
|
|
679
|
+
@@id([initiative_id, tag_id])
|
|
680
|
+
@@index([initiative_id], map: "idx_initiatives_tags_initiative")
|
|
681
|
+
@@index([tag_id], map: "idx_initiatives_tags_tag")
|
|
682
|
+
}
|