@juliobrim/prisma-shared 1.0.24 → 1.0.25

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.
@@ -0,0 +1,9 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."input_register" ADD COLUMN "operationId" TEXT,
3
+ ADD COLUMN "productionOrderId" TEXT;
4
+
5
+ -- AddForeignKey
6
+ ALTER TABLE "public"."input_register" ADD CONSTRAINT "input_register_operationId_fkey" FOREIGN KEY ("operationId") REFERENCES "public"."operation"("id") ON DELETE CASCADE ON UPDATE CASCADE;
7
+
8
+ -- AddForeignKey
9
+ ALTER TABLE "public"."input_register" ADD CONSTRAINT "input_register_productionOrderId_fkey" FOREIGN KEY ("productionOrderId") REFERENCES "public"."production_order"("id") ON DELETE CASCADE ON UPDATE CASCADE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juliobrim/prisma-shared",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Schema Prisma compartilhado entre projetos Sabcon",
5
5
  "main": "schema.prisma",
6
6
  "files": [
package/schema.prisma CHANGED
@@ -173,16 +173,20 @@ model Follower {
173
173
  }
174
174
 
175
175
  model InputRegister {
176
- id Int @id @default(autoincrement())
177
- in1Count BigInt @map("in1_count")
178
- in2Count BigInt @map("in2_count")
179
- in3Count BigInt @map("in3_count")
180
- in4Count BigInt @map("in4_count")
181
- timestamp DateTime @default(now())
182
- machineId String
183
- tenantId String?
184
- machine Machine @relation(fields: [machineId], references: [id], onDelete: Cascade)
185
- tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)
176
+ id Int @id @default(autoincrement())
177
+ in1Count BigInt @map("in1_count")
178
+ in2Count BigInt @map("in2_count")
179
+ in3Count BigInt @map("in3_count")
180
+ in4Count BigInt @map("in4_count")
181
+ timestamp DateTime @default(now())
182
+ machineId String
183
+ tenantId String?
184
+ operationId String?
185
+ productionOrderId String?
186
+ machine Machine @relation(fields: [machineId], references: [id], onDelete: Cascade)
187
+ tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)
188
+ operation Operation? @relation(fields: [operationId], references: [id], onDelete: Cascade)
189
+ productionOrder ProductionOrder? @relation(fields: [productionOrderId], references: [id], onDelete: Cascade)
186
190
 
187
191
  @@map("input_register")
188
192
  }
@@ -362,6 +366,7 @@ model Operation {
362
366
  downtimeEvents DowntimeEvent[]
363
367
  itemsHandlingRegisters ItemsHandlingRegister[]
364
368
  nodeOperationQueue NodeOperationQueue[]
369
+ inputRegisters InputRegister[]
365
370
  node Node @relation(fields: [nodeId], references: [id], onDelete: Cascade)
366
371
  resource Resource @relation(fields: [resourceId], references: [id])
367
372
  tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)
@@ -578,6 +583,7 @@ model ProductionOrder {
578
583
  NodeOperationQueue NodeOperationQueue[]
579
584
  operationRegisters OperationRegister[]
580
585
  productionNode ProductionNode[]
586
+ inputRegisters InputRegister[]
581
587
  flow Flow? @relation(fields: [flowId], references: [id])
582
588
  Product Product @relation(fields: [productId], references: [id])
583
589
  tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)