feat: remove deprecated exam fields (#62852)

This commit is contained in:
Shaun Hamilton
2025-10-16 18:54:58 +02:00
committed by GitHub
parent 5add4262bd
commit 59cab66cf2
11 changed files with 43 additions and 128 deletions
+4 -8
View File
@@ -14,8 +14,7 @@ model ExamCreatorExam {
deprecated Boolean
/// Version of the record
/// The default must be incremented by 1, if anything in the schema changes
version Int @default(2)
version Int @default(3)
}
/// Exam Creator application collection to store authZ users.
@@ -30,10 +29,8 @@ model ExamCreatorUser {
github_id Int?
name String
picture String?
/// TODO: After migration, remove optionality
settings ExamCreatorUserSettings?
version Int @default(1)
settings ExamCreatorUserSettings
version Int @default(2)
ExamCreatorSession ExamCreatorSession[]
}
@@ -55,8 +52,7 @@ model ExamCreatorSession {
/// Expiration date for record.
expires_at DateTime
version Int @default(1)
version Int @default(1)
ExamCreatorUser ExamCreatorUser @relation(fields: [user_id], references: [id])
}
+9 -17
View File
@@ -12,7 +12,7 @@ model ExamEnvironmentExam {
deprecated Boolean
/// Version of the record
/// The default must be incremented by 1, if anything in the schema changes
version Int @default(2)
version Int @default(3)
// Relations
generatedExams ExamEnvironmentGeneratedExam[]
@@ -83,16 +83,12 @@ type ExamEnvironmentConfig {
note String
/// Category configuration for question selection
tags ExamEnvironmentTagConfig[]
/// Deprecated: use `totalTimeInS` instead
totalTimeInMS Int
/// Total time allocated for exam in seconds
totalTimeInS Int?
totalTimeInS Int
/// Configuration for sets of questions
questionSets ExamEnvironmentQuestionSetConfig[]
/// Deprecated: use `retakeTimeInS` instead
retakeTimeInMS Int
/// Duration after exam completion before a retake is allowed in seconds
retakeTimeInS Int?
retakeTimeInS Int
/// Passing percent for the exam
passingPercent Float
}
@@ -130,14 +126,12 @@ model ExamEnvironmentExamAttempt {
/// Foreign key to generated exam id
generatedExamId String @db.ObjectId
questionSets ExamEnvironmentQuestionSetAttempt[]
/// Deprecated: Use `startTime` instead
startTimeInMS Int
questionSets ExamEnvironmentQuestionSetAttempt[]
/// Time exam was started
startTime DateTime?
startTime DateTime
/// Version of the record
/// The default must be incremented by 1, if anything in the schema changes
version Int @default(2)
version Int @default(3)
// Relations
user user @relation(fields: [userId], references: [id], onDelete: Cascade)
@@ -153,15 +147,13 @@ type ExamEnvironmentQuestionSetAttempt {
type ExamEnvironmentMultipleChoiceQuestionAttempt {
/// Foreign key to question
id String @db.ObjectId
id String @db.ObjectId
/// An array of foreign keys to answers
answers String[] @db.ObjectId
/// Deprecated: Use `submissionTime` instead
submissionTimeInMS Int
answers String[] @db.ObjectId
/// Time answers to question were submitted
///
/// If the question is later revisited, this field is updated
submissionTime DateTime?
submissionTime DateTime
}
/// A generated exam for the Exam Environment App