@gbl-uzh/platform 0.4.16 → 0.4.18

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.
Files changed (2) hide show
  1. package/dist/schema.prisma +14 -14
  2. package/package.json +1 -1
@@ -98,7 +98,7 @@ model Game {
98
98
 
99
99
  activePeriodIx Int @default(-1)
100
100
  activePeriodId Int?
101
- activePeriod Period? @relation("activePeriod", fields: [activePeriodId], references: [id], onUpdate: NoAction, onDelete: NoAction)
101
+ activePeriod Period? @relation("activePeriod", fields: [activePeriodId], references: [id], onUpdate: NoAction, onDelete: Cascade)
102
102
 
103
103
  segments PeriodSegment[]
104
104
 
@@ -123,7 +123,7 @@ model Period {
123
123
 
124
124
  activeSegmentIx Int @default(-1)
125
125
  activeSegmentId Int?
126
- activeSegment PeriodSegment? @relation("activeSegment", fields: [activeSegmentId], references: [id], onUpdate: NoAction, onDelete: NoAction)
126
+ activeSegment PeriodSegment? @relation("activeSegment", fields: [activeSegmentId], references: [id], onUpdate: NoAction, onDelete: Cascade)
127
127
 
128
128
  decisions PlayerDecision[]
129
129
  results PlayerResult[]
@@ -135,7 +135,7 @@ model Period {
135
135
  nextPeriod Period? @relation("periodSequence", fields: [nextPeriodId], references: [id], onUpdate: NoAction, onDelete: NoAction)
136
136
 
137
137
  gameId Int
138
- game Game @relation(fields: [gameId], references: [id])
138
+ game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
139
139
 
140
140
  Game Game[] @relation("activePeriod")
141
141
 
@@ -161,14 +161,14 @@ model PeriodSegment {
161
161
  learningElements LearningElement[]
162
162
  storyElements StoryElement[]
163
163
 
164
- period Period @relation(fields: [periodId], references: [id])
164
+ period Period @relation(fields: [periodId], references: [id], onDelete: Cascade)
165
165
  periodId Int
166
166
  periodIx Int
167
167
 
168
168
  Period Period[] @relation("activeSegment")
169
169
 
170
170
  gameId Int
171
- game Game @relation(fields: [gameId], references: [id])
171
+ game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
172
172
 
173
173
  previousSegment PeriodSegment[] @relation("segmentSequence")
174
174
  nextSegmentId Int?
@@ -189,7 +189,7 @@ model Player {
189
189
 
190
190
  experience Int @default(0)
191
191
  experienceToNext Int @default(100)
192
- level PlayerLevel @relation(fields: [levelIx], references: [index])
192
+ level PlayerLevel @relation(fields: [levelIx], references: [index], onDelete: Cascade)
193
193
  levelIx Int
194
194
  tutorialCompleted Boolean @default(false)
195
195
 
@@ -214,7 +214,7 @@ model Player {
214
214
  visitedStoryElementIds String[]
215
215
 
216
216
  gameId Int
217
- game Game @relation(fields: [gameId], references: [id])
217
+ game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
218
218
 
219
219
  createdAt DateTime @default(now())
220
220
  updatedAt DateTime @updatedAt
@@ -227,18 +227,18 @@ model PlayerAction {
227
227
  facts Json
228
228
 
229
229
  gameId Int
230
- game Game @relation(fields: [gameId], references: [id])
230
+ game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
231
231
 
232
232
  playerId String @db.Uuid
233
- player Player @relation(fields: [playerId], references: [id])
233
+ player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)
234
234
 
235
235
  periodId Int
236
236
  periodIx Int
237
- period Period @relation(fields: [periodId], references: [id])
237
+ period Period @relation(fields: [periodId], references: [id], onDelete: Cascade)
238
238
 
239
239
  segmentId Int?
240
240
  segmentIx Int?
241
- segment PeriodSegment? @relation(fields: [segmentId], references: [id])
241
+ segment PeriodSegment? @relation(fields: [segmentId], references: [id], onDelete: Cascade)
242
242
 
243
243
  createdAt DateTime @default(now())
244
244
  }
@@ -258,14 +258,14 @@ model PlayerResult {
258
258
  facts Json
259
259
 
260
260
  playerId String @db.Uuid
261
- player Player @relation(fields: [playerId], references: [id])
261
+ player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)
262
262
 
263
263
  gameId Int
264
- game Game @relation(fields: [gameId], references: [id])
264
+ game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
265
265
 
266
266
  periodId Int
267
267
  periodIx Int
268
- period Period @relation(fields: [periodId], references: [id])
268
+ period Period @relation(fields: [periodId], references: [id], onDelete: Cascade)
269
269
 
270
270
  segmentId Int?
271
271
  segmentIx Int?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gbl-uzh/platform",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "license": "LGPL-3.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",