fix(db): cast status to varchar in sync queue update for proper enum comparison
This commit is contained in:
@@ -7492,7 +7492,7 @@ SET
|
|||||||
status = $2,
|
status = $2,
|
||||||
attempts = attempts + 1,
|
attempts = attempts + 1,
|
||||||
error_message = $3,
|
error_message = $3,
|
||||||
processed_at = CASE WHEN $2 = 'completed' THEN NOW() ELSE NULL END
|
processed_at = CASE WHEN $2::varchar = 'completed' THEN NOW() ELSE NULL END
|
||||||
WHERE id = $1
|
WHERE id = $1
|
||||||
RETURNING id, device_id, media_item_id, sync_type, sync_data, priority, attempts, max_attempts, status, error_message, created_at, processed_at
|
RETURNING id, device_id, media_item_id, sync_type, sync_data, priority, attempts, max_attempts, status, error_message, created_at, processed_at
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -812,7 +812,7 @@ SET
|
|||||||
status = $2,
|
status = $2,
|
||||||
attempts = attempts + 1,
|
attempts = attempts + 1,
|
||||||
error_message = $3,
|
error_message = $3,
|
||||||
processed_at = CASE WHEN $2 = 'completed' THEN NOW() ELSE NULL END
|
processed_at = CASE WHEN $2::varchar = 'completed' THEN NOW() ELSE NULL END
|
||||||
WHERE id = $1
|
WHERE id = $1
|
||||||
RETURNING *;
|
RETURNING *;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user