Commit 8ce87c5
fix(cloud-sync): aggiungi positions.updated_at — sblocca pull-desired-state
La route GET /api/cloud-sync/pull-desired-state usa positions.updated_at come
cursore delta (.gt/.order/cursor) ma la colonna non è mai esistita nello schema
(001 definisce solo created_at). Andava in HTTP 500 a ogni ciclo del daemon
("column positions.updated_at does not exist"), quindi le intenzioni scritte
dall'utente via web — write_requested / recheck_requested / geocode_requested /
user_excluded / salary_precise — non raggiungevano mai la VPS ("non si
sincronizza da pulsante web").
Aggiunge la colonna + trigger BEFORE UPDATE che riusa update_updated_at() (già
in 001): ogni UPDATE (route desired-state e upsert di push) avanza il cursore.
Applicata anche a produzione (Supabase smittwvohsnwwwisqdrh); verificata live su
Ashley: "✓ Pull desired-state applicato: 59 positions aggiornate".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0683f39 commit 8ce87c5
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments