@bslau/hmm_prisma_schema 1.1.15 → 1.1.16

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": "@bslau/hmm_prisma_schema",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "main": "index.js",
5
5
  "author": "CIPA Development Team",
6
6
  "license": "ISC",
@@ -0,0 +1,33 @@
1
+ BEGIN TRY
2
+
3
+ BEGIN TRAN;
4
+
5
+ -- AlterTable
6
+ ALTER TABLE [dbo].[Torpedo] ADD [hmhSixPitRestrictionFlag] BIT NOT NULL CONSTRAINT [Torpedo_hmhSixPitRestrictionFlag_df] DEFAULT 0;
7
+
8
+ -- CreateTable
9
+ CREATE TABLE [dbo].[HMHComment] (
10
+ [id] INT NOT NULL IDENTITY(1,1),
11
+ [torpedoId] INT NOT NULL,
12
+ [comment] NVARCHAR(1000) NOT NULL,
13
+ [isRemoved] BIT NOT NULL CONSTRAINT [HMHComment_isRemoved_df] DEFAULT 0,
14
+ [createdAt] DATETIME2 NOT NULL CONSTRAINT [HMHComment_createdAt_df] DEFAULT CURRENT_TIMESTAMP,
15
+ [updatedAt] DATETIME2,
16
+ CONSTRAINT [HMHComment_pkey] PRIMARY KEY CLUSTERED ([id])
17
+ );
18
+
19
+ -- AddForeignKey
20
+ ALTER TABLE [dbo].[HMHComment] ADD CONSTRAINT [HMHComment_torpedoId_fkey] FOREIGN KEY ([torpedoId]) REFERENCES [dbo].[Torpedo]([torpedoId]) ON DELETE NO ACTION ON UPDATE CASCADE;
21
+
22
+ COMMIT TRAN;
23
+
24
+ END TRY
25
+ BEGIN CATCH
26
+
27
+ IF @@TRANCOUNT > 0
28
+ BEGIN
29
+ ROLLBACK TRAN;
30
+ END;
31
+ THROW
32
+
33
+ END CATCH
@@ -124,6 +124,7 @@ model Torpedo {
124
124
  heatUpStartTime DateTime? @db.DateTimeOffset
125
125
  onGasFlag Boolean @default(false)
126
126
  onGasEndDate DateTime? @db.DateTimeOffset
127
+ hmhSixPitRestrictionFlag Boolean @default(false)
127
128
  sixPitRestrictionFlag Boolean @default(false)
128
129
  sixPitRestrictionEndTime DateTime? @db.DateTimeOffset
129
130
  status Int @default(2)
@@ -136,6 +137,7 @@ model Torpedo {
136
137
  hotMetalCollection HotMetal[]
137
138
  torpedoLocation TorpedoLocation?
138
139
  torpedoComments TorpedoComment[]
140
+ hmhComments HMHComment[]
139
141
  eventsTorpedoMovement EventTorpedoMovement[]
140
142
  createdAt DateTime @default(now())
141
143
  updatedAt DateTime @updatedAt
@@ -212,6 +214,16 @@ model TorpedoComment {
212
214
  updatedAt DateTime? @updatedAt
213
215
  }
214
216
 
217
+ model HMHComment {
218
+ id Int @id @default(autoincrement())
219
+ torpedo Torpedo @relation(fields: [torpedoId], references: [torpedoId], onDelete: NoAction, onUpdate: Cascade)
220
+ torpedoId Int
221
+ comment String
222
+ isRemoved Boolean @default(false)
223
+ createdAt DateTime @default(now())
224
+ updatedAt DateTime? @updatedAt
225
+ }
226
+
215
227
  model EventTracker {
216
228
  id Int @id @default(autoincrement())
217
229
  eventTime DateTime @db.DateTimeOffset