@@ -343,8 +343,8 @@ impl StageRepository {
343343 r#"
344344 WITH inserted AS (
345345 INSERT INTO user_stages (
346- id, user_course_id, stage_id, status, started_at
347- ) VALUES ($1, $2, $3, $4, $5)
346+ id, user_course_id, stage_id, status, test, started_at
347+ ) VALUES ($1, $2, $3, $4, $5, $6 )
348348 RETURNING *
349349 )
350350 SELECT
@@ -361,6 +361,7 @@ impl StageRepository {
361361 . bind ( user_stage. user_course_id )
362362 . bind ( user_stage. stage_id )
363363 . bind ( & user_stage. status )
364+ . bind ( & user_stage. test )
364365 . bind ( user_stage. started_at )
365366 . fetch_one ( & mut * * tx)
366367 . await ?;
@@ -381,7 +382,8 @@ impl StageRepository {
381382 UPDATE user_stages
382383 SET
383384 status = $2,
384- completed_at = $3
385+ test = $3,
386+ completed_at = $4
385387 WHERE id = $1
386388 RETURNING *
387389 )
@@ -397,6 +399,7 @@ impl StageRepository {
397399 )
398400 . bind ( user_stage. id )
399401 . bind ( & user_stage. status )
402+ . bind ( & user_stage. test )
400403 . bind ( user_stage. completed_at )
401404 . fetch_one ( & mut * * tx)
402405 . await ?;
0 commit comments