efiber-prisma-schema 1.12.11 → 1.12.13

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.11",
3
+ "version": "1.12.13",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,17 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The `projectPhase` column on the `Cluster` table would be dropped and recreated. This will lead to data loss if there is data in the column.
5
+
6
+ */
7
+ -- CreateEnum
8
+ CREATE TYPE "ClusterProjectPhase" AS ENUM ('Survey', 'Design', 'Construction', 'GIS', 'Dispatch');
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "Cluster" ADD COLUMN "constructionProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
12
+ ADD COLUMN "designProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
13
+ ADD COLUMN "dispatchProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
14
+ ADD COLUMN "gisProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
15
+ ADD COLUMN "surveyProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
16
+ DROP COLUMN "projectPhase",
17
+ ADD COLUMN "projectPhase" "ClusterProjectPhase" NOT NULL DEFAULT 'Survey';
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `type` to the `ClusterComments` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "ClusterComments" ADD COLUMN "type" TEXT NOT NULL;
@@ -95,6 +95,14 @@ enum NotificationPlatform {
95
95
  Mobile
96
96
  }
97
97
 
98
+ enum ClusterProjectPhase {
99
+ Survey
100
+ Design
101
+ Construction
102
+ GIS
103
+ Dispatch
104
+ }
105
+
98
106
  model Country {
99
107
  id String @id @unique @default(uuid())
100
108
  no Int @default(autoincrement())
@@ -2404,9 +2412,14 @@ model Cluster {
2404
2412
  updatedAt DateTime @updatedAt
2405
2413
  deletedAt DateTime?
2406
2414
 
2407
- projectPhase String? @default("In-Progress")
2408
- namingConvention Json?
2409
- installationStatus Int? @default(0) //percentage of installation completed
2415
+ projectPhase ClusterProjectPhase @default(Survey)
2416
+ surveyProjectStatus String @default("Pending")
2417
+ designProjectStatus String @default("Pending")
2418
+ constructionProjectStatus String @default("Pending")
2419
+ gisProjectStatus String @default("Pending")
2420
+ dispatchProjectStatus String @default("Pending")
2421
+ namingConvention Json?
2422
+ installationStatus Int? @default(0) //percentage of installation completed
2410
2423
 
2411
2424
  centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
2412
2425
  centralOfficeId String?
@@ -2445,6 +2458,7 @@ model ClusterComments {
2445
2458
  no Int @default(autoincrement())
2446
2459
 
2447
2460
  comment String
2461
+ type String
2448
2462
  createdAt DateTime @default(now())
2449
2463
  updatedAt DateTime @updatedAt
2450
2464
  deletedAt DateTime?