chore(jobs): align log keys + add prune no-op test + down-migration comment

Cross-cutting review polish:
- worker.go: id/type → job_id/job_type; one stray attempts → attempt for
  consistency with the other 4 sites in the same file.
- runners/workspace_fetch.go: ws_id → workspace_id (matches the dispatched
  notify.Message metadata key).
- runners/worktree_prune.go: id → worktree_id (same reason).
- runners/worktree_prune_test.go: add TestWorktreePrune_NoRowsIsNoOp for
  symmetry with the no-op tests in the other 4 runner test files.
- migrations/0005_jobs.down.sql: comment that DROP TABLE jobs cascades to
  drop the three idx_jobs_* indexes automatically.
This commit is contained in:
2026-05-06 11:52:17 +08:00
parent cf1ec7b1c6
commit f6089ac5fb
5 changed files with 39 additions and 20 deletions
+2
View File
@@ -1,2 +1,4 @@
ALTER TABLE workspace_worktrees DROP COLUMN IF EXISTS prune_warning_at;
-- DROP TABLE jobs cascades to drop idx_jobs_status_scheduled, idx_jobs_leased,
-- and idx_jobs_completed_at automatically.
DROP TABLE IF EXISTS jobs;