fix: add date_posted migration + cloud startup sweep
date_posted column was added to db.py CREATE TABLE but had no migration file, so existing user DBs were missing it. The list_jobs endpoint queries this column, causing 500 errors and empty Apply/Review queues for all existing cloud users while job_counts (which doesn't touch date_posted) continued to work — making the home page show correct counts but tabs show empty data. Fixes: - migrations/006_date_posted.sql: ALTER TABLE to add date_posted to existing DBs - dev_api.py lifespan: on startup in cloud mode, sweep all user DBs in CLOUD_DATA_ROOT and apply pending migrations — ensures schema changes land for every user on each deploy, not only on their first post-deploy request
This commit is contained in:
parent
03b9e52301
commit
a302049f72
1 changed files with 6 additions and 0 deletions
6
migrations/006_date_posted.sql
Normal file
6
migrations/006_date_posted.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-- 006_date_posted.sql
|
||||
-- Add date_posted column for shadow listing detection (stale/shadow score feature).
|
||||
-- New DBs already have this column from the CREATE TABLE statement in db.py;
|
||||
-- this migration adds it to existing user DBs.
|
||||
|
||||
ALTER TABLE jobs ADD COLUMN date_posted TEXT;
|
||||
Loading…
Reference in a new issue