@bslau/hmm_prisma_schema 1.1.9 → 1.1.11

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.9",
3
+ "version": "1.1.11",
4
4
  "main": "index.js",
5
5
  "author": "CIPA Development Team",
6
6
  "license": "ISC",
@@ -0,0 +1,20 @@
1
+ BEGIN TRY
2
+
3
+ BEGIN TRAN;
4
+
5
+ -- AlterTable
6
+ ALTER TABLE [dbo].[TorpedoComment] ALTER COLUMN [savedDateTime] DATETIMEOFFSET NULL;
7
+ ALTER TABLE [dbo].[TorpedoComment] ADD [createdAt] DATETIME2 NOT NULL CONSTRAINT [TorpedoComment_createdAt_df] DEFAULT CURRENT_TIMESTAMP;
8
+
9
+ COMMIT TRAN;
10
+
11
+ END TRY
12
+ BEGIN CATCH
13
+
14
+ IF @@TRANCOUNT > 0
15
+ BEGIN
16
+ ROLLBACK TRAN;
17
+ END;
18
+ THROW
19
+
20
+ END CATCH
@@ -135,6 +135,7 @@ model Torpedo {
135
135
  // gasStart DateTime?
136
136
  hotMetalCollection HotMetal[]
137
137
  torpedoLocation TorpedoLocation?
138
+ torpedoComments TorpedoComment[]
138
139
  eventsTorpedoMovement EventTorpedoMovement[]
139
140
  createdAt DateTime @default(now())
140
141
  updatedAt DateTime @updatedAt
@@ -199,6 +200,16 @@ model TorpedoLocation {
199
200
  @@id([stationId, position])
200
201
  }
201
202
 
203
+ model TorpedoComment {
204
+ id Int @id @default(autoincrement())
205
+ torpedo Torpedo @relation(fields: [torpedoId], references: [torpedoId], onDelete: NoAction, onUpdate: Cascade)
206
+ torpedoId Int
207
+ comment String
208
+ isCleared Boolean
209
+ createdAt DateTime @default(now())
210
+ updatedAt DateTime @updatedAt
211
+ }
212
+
202
213
  model EventTracker {
203
214
  id Int @id @default(autoincrement())
204
215
  eventTime DateTime @db.DateTimeOffset