efiber-prisma-schema 1.15.0 → 1.16.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
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "Cable" ADD COLUMN "isSubcable" BOOLEAN NOT NULL DEFAULT false,
|
|
3
|
+
ADD COLUMN "parentCableId" TEXT,
|
|
4
|
+
ADD COLUMN "parentCableName" TEXT;
|
|
5
|
+
|
|
6
|
+
-- AddForeignKey
|
|
7
|
+
ALTER TABLE "Cable" ADD CONSTRAINT "Cable_parentCableId_fkey" FOREIGN KEY ("parentCableId") REFERENCES "Cable"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -1540,6 +1540,15 @@ model Cable {
|
|
|
1540
1540
|
client String? //Client associated with the cable
|
|
1541
1541
|
subsidiary String? //Subsidiary or branch
|
|
1542
1542
|
|
|
1543
|
+
// parent/subcable implementation
|
|
1544
|
+
isSubcable Boolean @default(false)
|
|
1545
|
+
|
|
1546
|
+
parentCable Cable? @relation("CableToSubcables", fields: [parentCableId], references: [id])
|
|
1547
|
+
parentCableId String?
|
|
1548
|
+
parentCableName String?
|
|
1549
|
+
|
|
1550
|
+
subcables Cable[] @relation("CableToSubcables")
|
|
1551
|
+
|
|
1543
1552
|
createdAt DateTime @default(now())
|
|
1544
1553
|
updatedAt DateTime @updatedAt
|
|
1545
1554
|
deletedAt DateTime?
|
|
@@ -1655,6 +1664,8 @@ model Conduit {
|
|
|
1655
1664
|
updatedAt DateTime @updatedAt
|
|
1656
1665
|
deletedAt DateTime?
|
|
1657
1666
|
|
|
1667
|
+
namePrefix String?
|
|
1668
|
+
|
|
1658
1669
|
asBuiltCoordinates Json? //As built coordinates
|
|
1659
1670
|
isInstalled Boolean @default(false)
|
|
1660
1671
|
installationDate DateTime?
|