Keep all burst images, use last timestamp as passage time
Build & Deploy / build-and-deploy (push) Failing after 2m41s
Build & Deploy / build-and-deploy (push) Failing after 2m41s
- passage_images table stores every image in a burst sequence
- Passage timestamp = last image (chronologically) in the burst
- Review UI: image slider to browse all burst images, slider ends
at the official passage time (rightmost = last image)
- API: GET /api/passages/{id}/images
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -33,7 +33,6 @@ async def init_db(db: aiosqlite.Connection) -> None:
|
||||
gps_lon REAL,
|
||||
gps_alt REAL,
|
||||
confidence REAL,
|
||||
proximity_score REAL NOT NULL DEFAULT 0,
|
||||
id_method TEXT,
|
||||
source_image TEXT,
|
||||
needs_review INTEGER NOT NULL DEFAULT 0,
|
||||
@@ -41,9 +40,19 @@ async def init_db(db: aiosqlite.Connection) -> None:
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS passage_images (
|
||||
image_id TEXT PRIMARY KEY,
|
||||
passage_id TEXT NOT NULL REFERENCES passages(passage_id) ON DELETE CASCADE,
|
||||
image_path TEXT NOT NULL,
|
||||
timestamp_utc TEXT NOT NULL,
|
||||
proximity_score REAL NOT NULL DEFAULT 0,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_passages_profile ON passages(profile_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_passages_station ON passages(station);
|
||||
CREATE INDEX IF NOT EXISTS idx_passages_needs_review ON passages(needs_review);
|
||||
CREATE INDEX IF NOT EXISTS idx_passage_images_passage ON passage_images(passage_id);
|
||||
""")
|
||||
await db.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user