From 54530d67efb20f55c6d8517fc952b37bb7afdec0 Mon Sep 17 00:00:00 2001 From: fabi Date: Sun, 14 Jun 2026 16:59:18 +0200 Subject: [PATCH] fix(tests): query admin_audit by its real timestamp column 'at' Two requeue-audit tests in api_admin_crawler ordered by created_at, but the admin_audit table's timestamp column is 'at' (migration 0019), so the queries failed at runtime with 42703 (column does not exist). This was the last pre-0.81 test breakage gating deploy; full suite now green locally (cargo test --no-fail-fast). Co-Authored-By: Claude Opus 4.8 --- backend/tests/api_admin_crawler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/tests/api_admin_crawler.rs b/backend/tests/api_admin_crawler.rs index 1fdb3be..34f4cde 100644 --- a/backend/tests/api_admin_crawler.rs +++ b/backend/tests/api_admin_crawler.rs @@ -573,7 +573,7 @@ async fn requeue_chapter_audit_records_chapter_target_id(pool: PgPool) { let (target_kind, target_id): (String, Option) = sqlx::query_as( "SELECT target_kind, target_id FROM admin_audit \ WHERE action = 'crawler_dead_jobs_requeue' \ - ORDER BY created_at DESC LIMIT 1", + ORDER BY at DESC LIMIT 1", ) .fetch_one(&pool) .await @@ -601,7 +601,7 @@ async fn requeue_all_audit_omits_target_id_but_logs_count(pool: PgPool) { sqlx::query_as( "SELECT target_kind, target_id, payload FROM admin_audit \ WHERE action = 'crawler_dead_jobs_requeue' \ - ORDER BY created_at DESC LIMIT 1", + ORDER BY at DESC LIMIT 1", ) .fetch_one(&pool) .await