Skip to content

Commit

Permalink
#2180 - Assessment Workflow Enqueuer Scheduler - Start Assessment (Pa…
Browse files Browse the repository at this point in the history
…rt 1) - DB migration fix (#2290)

A missing CASE condition was causing an attempt to set null the student
assessment status: "QueryFailedError: null value in column
"student_assessment_status" violates not-null constraint".
  • Loading branch information
andrewsignori-aot authored Sep 12, 2023
1 parent 672f0a4 commit 609c800
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
Updates all assessments associated with active applications.
By default all records were created with 'Submitted' hence there is
no need to have it added to below CASE conditions.
*/
UPDATE
sims.student_assessments sa
Expand All @@ -11,6 +9,7 @@ SET
WHEN sa.assessment_data IS NOT NULL THEN 'Completed'
WHEN sa.assessment_workflow_id IS NOT NULL
AND sa.assessment_data IS NULL THEN 'In progress'
ELSE 'Submitted'
END
) :: sims.student_assessment_status
FROM
Expand Down

0 comments on commit 609c800

Please sign in to comment.