efiber-prisma-schema 1.10.12 → 1.10.14

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.10.12",
3
+ "version": "1.10.14",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,10 +18,13 @@
18
18
  },
19
19
  "homepage": "https://github.com/ubuniworks-projects/efiber-prisma-schema#readme",
20
20
  "devDependencies": {
21
- "@prisma/client": "^6.5.0",
22
- "prisma": "^6.5.0"
21
+ "@prisma/client": "^6.8.1",
22
+ "prisma": "^6.8.1"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@prisma/client": ">=5"
26
+ },
27
+ "dependencies": {
28
+ "npm": "^11.4.0"
26
29
  }
27
30
  }
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "DispatchTeam" ADD COLUMN "contractorTeamId" TEXT;
3
+
4
+ -- AddForeignKey
5
+ ALTER TABLE "DispatchTeam" ADD CONSTRAINT "DispatchTeam_contractorTeamId_fkey" FOREIGN KEY ("contractorTeamId") REFERENCES "Team"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,16 @@
1
+ -- CreateTable
2
+ CREATE TABLE "_CamusatClientToUser" (
3
+ "A" TEXT NOT NULL,
4
+ "B" TEXT NOT NULL,
5
+
6
+ CONSTRAINT "_CamusatClientToUser_AB_pkey" PRIMARY KEY ("A","B")
7
+ );
8
+
9
+ -- CreateIndex
10
+ CREATE INDEX "_CamusatClientToUser_B_index" ON "_CamusatClientToUser"("B");
11
+
12
+ -- AddForeignKey
13
+ ALTER TABLE "_CamusatClientToUser" ADD CONSTRAINT "_CamusatClientToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "CamusatClient"("id") ON DELETE CASCADE ON UPDATE CASCADE;
14
+
15
+ -- AddForeignKey
16
+ ALTER TABLE "_CamusatClientToUser" ADD CONSTRAINT "_CamusatClientToUser_B_fkey" FOREIGN KEY ("B") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -1,3 +1,3 @@
1
1
  # Please do not edit this file manually
2
2
  # It should be added in your version-control system (e.g., Git)
3
- provider = "postgresql"
3
+ provider = "postgresql"
@@ -85,6 +85,7 @@ model CamusatClient {
85
85
 
86
86
  mainProject MainProject[]
87
87
  clientMaterial clientMaterial[]
88
+ users User[]
88
89
  }
89
90
 
90
91
  model Platform {
@@ -302,6 +303,7 @@ model Team {
302
303
  teamTypeId String
303
304
  TeamPlatform TeamPlatform[]
304
305
  User User[]
306
+ DispatchTeam DispatchTeam[]
305
307
  }
306
308
 
307
309
  model TeamPlatform {
@@ -406,6 +408,7 @@ model User {
406
408
  BuildingTemplate BuildingTemplate[]
407
409
  integrationProjectUserStatus integrationProjectUserStatus[]
408
410
  integrationUserLocation integrationUserLocation[]
411
+ CamusatClient CamusatClient[]
409
412
  }
410
413
 
411
414
  model MainProject {
@@ -556,6 +559,9 @@ model DispatchTeam {
556
559
  secondTechnicianId String?
557
560
  otherTechnicianId String?
558
561
 
562
+ contractorTeam Team? @relation(fields: [contractorTeamId], references: [id])
563
+ contractorTeamId String?
564
+
559
565
  TeamMaterial TeamMaterial[]
560
566
  WorkOrders WorkOrder[]
561
567
  dispatchProjects DispatchProject[]