efiber-prisma-schema 1.12.16 → 1.12.17

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efiber-prisma-schema",
3
- "version": "1.12.16",
3
+ "version": "1.12.17",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,27 @@
1
+ -- AlterTable
2
+ ALTER TABLE "AttributeDefinition" ADD COLUMN "visibleOnDispatchMobile" BOOLEAN NOT NULL DEFAULT true;
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "ClusterNotes" (
6
+ "id" TEXT NOT NULL,
7
+ "no" SERIAL NOT NULL,
8
+ "comment" TEXT NOT NULL,
9
+ "hasPicture" BOOLEAN NOT NULL DEFAULT false,
10
+ "coordinates" JSONB,
11
+ "picture" TEXT,
12
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
13
+ "updatedAt" TIMESTAMP(3) NOT NULL,
14
+ "createdById" TEXT NOT NULL,
15
+ "clusterId" TEXT NOT NULL,
16
+
17
+ CONSTRAINT "ClusterNotes_pkey" PRIMARY KEY ("id")
18
+ );
19
+
20
+ -- CreateIndex
21
+ CREATE UNIQUE INDEX "ClusterNotes_id_key" ON "ClusterNotes"("id");
22
+
23
+ -- AddForeignKey
24
+ ALTER TABLE "ClusterNotes" ADD CONSTRAINT "ClusterNotes_createdById_fkey" FOREIGN KEY ("createdById") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
25
+
26
+ -- AddForeignKey
27
+ ALTER TABLE "ClusterNotes" ADD CONSTRAINT "ClusterNotes_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -518,6 +518,7 @@ model User {
518
518
  ClusterComments ClusterComments[]
519
519
  CreatedRevisions Revision[] @relation("revisionCreatedBy")
520
520
  ResolvedRevisions Revision[] @relation("revisionResolvedBy")
521
+ ClusterNotes ClusterNotes[]
521
522
  }
522
523
 
523
524
  model MainProject {
@@ -1429,10 +1430,11 @@ model AttributeDefinition {
1429
1430
  label String
1430
1431
  type AttributeType
1431
1432
 
1432
- required Boolean @default(false)
1433
- visibleOnWeb Boolean @default(true)
1434
- visibleOnMobile Boolean @default(true)
1435
- AttributeValue AttributeValue[]
1433
+ required Boolean @default(false)
1434
+ visibleOnWeb Boolean @default(true)
1435
+ visibleOnMobile Boolean @default(true)
1436
+ visibleOnDispatchMobile Boolean @default(true)
1437
+ AttributeValue AttributeValue[]
1436
1438
  }
1437
1439
 
1438
1440
  model OptionSource {
@@ -2697,6 +2699,7 @@ model Cluster {
2697
2699
  ClusterComments ClusterComments[]
2698
2700
  Revision Revision[]
2699
2701
  ElementRelation ElementRelation[]
2702
+ ClusterNotes ClusterNotes[]
2700
2703
  }
2701
2704
 
2702
2705
  model ClusterComments {
@@ -2716,6 +2719,25 @@ model ClusterComments {
2716
2719
  clusterId String
2717
2720
  }
2718
2721
 
2722
+ model ClusterNotes {
2723
+ id String @id @unique @default(uuid())
2724
+ no Int @default(autoincrement())
2725
+
2726
+ comment String
2727
+ hasPicture Boolean @default(false)
2728
+ coordinates Json?
2729
+ picture String?
2730
+
2731
+ createdAt DateTime @default(now())
2732
+ updatedAt DateTime @updatedAt
2733
+
2734
+ createdBy User @relation(fields: [createdById], references: [id])
2735
+ createdById String
2736
+
2737
+ cluster Cluster @relation(fields: [clusterId], references: [id])
2738
+ clusterId String
2739
+ }
2740
+
2719
2741
  model CentralOfficeTeam {
2720
2742
  id String @id @unique @default(uuid())
2721
2743
  no Int @default(autoincrement())