@bslau/hmm_prisma_schema 1.20.0 → 1.21.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,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[castSequence,torpedoId]` on the table `HotMetal` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
- Made the column `torpedoId` on table `HotMetal` required. This step will fail if there are existing NULL values in that column.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
BEGIN TRY
|
|
9
|
+
|
|
10
|
+
BEGIN TRAN;
|
|
11
|
+
|
|
12
|
+
-- AlterTable
|
|
13
|
+
ALTER TABLE [dbo].[HotMetal] ALTER COLUMN [torpedoId] INT NOT NULL;
|
|
14
|
+
|
|
15
|
+
-- CreateIndex
|
|
16
|
+
ALTER TABLE [dbo].[HotMetal] ADD CONSTRAINT [HotMetal_castSequence_torpedoId_key] UNIQUE NONCLUSTERED ([castSequence], [torpedoId]);
|
|
17
|
+
|
|
18
|
+
COMMIT TRAN;
|
|
19
|
+
|
|
20
|
+
END TRY
|
|
21
|
+
BEGIN CATCH
|
|
22
|
+
|
|
23
|
+
IF @@TRANCOUNT > 0
|
|
24
|
+
BEGIN
|
|
25
|
+
ROLLBACK TRAN;
|
|
26
|
+
END;
|
|
27
|
+
THROW
|
|
28
|
+
|
|
29
|
+
END CATCH
|
package/prisma/schema.prisma
CHANGED
|
@@ -236,8 +236,8 @@ model HotMetal {
|
|
|
236
236
|
mesId Int?
|
|
237
237
|
cast Cast @relation(fields: [castSequence], references: [sequenceCastBlastFurnace], onDelete: NoAction, onUpdate: Cascade)
|
|
238
238
|
castSequence Int
|
|
239
|
-
torpedo Torpedo
|
|
240
|
-
torpedoId Int
|
|
239
|
+
torpedo Torpedo @relation(fields: [torpedoId], references: [torpedoId], onDelete: NoAction, onUpdate: Cascade)
|
|
240
|
+
torpedoId Int
|
|
241
241
|
labResult HotMetalLabResult[]
|
|
242
242
|
torpedoCycle TorpedoCycle[]
|
|
243
243
|
torpedoTrip TorpedoTrip[]
|
|
@@ -274,6 +274,8 @@ model HotMetal {
|
|
|
274
274
|
hotMetalPouredCollection HotMetalPoured[]
|
|
275
275
|
createdAt DateTime @default(now())
|
|
276
276
|
updatedAt DateTime @updatedAt
|
|
277
|
+
|
|
278
|
+
@@unique(name: "cast_torpedo_id", [castSequence, torpedoId])
|
|
277
279
|
}
|
|
278
280
|
|
|
279
281
|
/// **LAB RESULT**
|
|
@@ -392,6 +394,7 @@ model PotMetal {
|
|
|
392
394
|
potMetalPouredCollection PotMetalPoured[]
|
|
393
395
|
potId Int
|
|
394
396
|
pot Pot @relation(references: [id], fields: [potId])
|
|
397
|
+
hmWeight Int?
|
|
395
398
|
createdAt DateTime @default(now())
|
|
396
399
|
updatedAt DateTime @updatedAt
|
|
397
400
|
}
|