@bslau/hmm_prisma_schema 1.8.0 → 1.8.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
package/prisma/migrations/20250730043550_fix_active_campaign_id_in_hmh_ladle_survey/migration.sql
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
BEGIN TRY
|
|
2
|
+
|
|
3
|
+
BEGIN TRAN;
|
|
4
|
+
|
|
5
|
+
-- DropIndex
|
|
6
|
+
ALTER TABLE [dbo].[HMHLadleSurvey] DROP CONSTRAINT [HMHLadleSurvey_activeCampaignId_key];
|
|
7
|
+
|
|
8
|
+
COMMIT TRAN;
|
|
9
|
+
|
|
10
|
+
END TRY
|
|
11
|
+
BEGIN CATCH
|
|
12
|
+
|
|
13
|
+
IF @@TRANCOUNT > 0
|
|
14
|
+
BEGIN
|
|
15
|
+
ROLLBACK TRAN;
|
|
16
|
+
END;
|
|
17
|
+
THROW
|
|
18
|
+
|
|
19
|
+
END CATCH
|
package/prisma/schema.prisma
CHANGED
|
@@ -154,7 +154,7 @@ model HMHLadleSurvey {
|
|
|
154
154
|
comment String?
|
|
155
155
|
resetOnLining Boolean @default(false)
|
|
156
156
|
activeCampaign TorpedoCampaign? @relation(fields: [activeCampaignId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
157
|
-
activeCampaignId Int?
|
|
157
|
+
activeCampaignId Int?
|
|
158
158
|
userId String?
|
|
159
159
|
createdAt DateTime @default(now())
|
|
160
160
|
updatedAt DateTime? @updatedAt
|
|
@@ -368,14 +368,14 @@ model Torpedo {
|
|
|
368
368
|
/// This indicates the entire refractory lining (or just working lining) is
|
|
369
369
|
/// removed and the tonnes and trips on the lining are reset.
|
|
370
370
|
model TorpedoCampaign {
|
|
371
|
-
id Int
|
|
372
|
-
torpedo Torpedo
|
|
371
|
+
id Int @id @default(autoincrement())
|
|
372
|
+
torpedo Torpedo @relation(fields: [torpedoId], references: [torpedoId], onDelete: NoAction, onUpdate: Cascade)
|
|
373
373
|
torpedoId Int
|
|
374
374
|
torpedoTrips TorpedoTrip[]
|
|
375
|
-
hmhLadleSurvey HMHLadleSurvey
|
|
376
|
-
isRebricking Boolean
|
|
377
|
-
startTime DateTime
|
|
378
|
-
endTime DateTime?
|
|
375
|
+
hmhLadleSurvey HMHLadleSurvey[]
|
|
376
|
+
isRebricking Boolean @default(false)
|
|
377
|
+
startTime DateTime @default(now()) @db.DateTimeOffset
|
|
378
|
+
endTime DateTime? @db.DateTimeOffset
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
/// **TORPEDO COMMENT**
|