Store all mode results (OCR, Describe, Freeform) in a single job record
- DB: add describe_text and freeform_text columns (ALTER TABLE IF NOT EXISTS) - Backend: commit and review endpoints accept/persist all three text fields - App: accumulate results per mode in state; tabs appear when >1 mode run; all results sent on Commit Job - JobDetail: tabbed text panel shows whichever fields are populated, all editable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,15 @@ def init_db():
|
||||
cur.execute("""
|
||||
CREATE INDEX IF NOT EXISTS ocr_jobs_submitted_at_idx ON ocr_jobs(submitted_at DESC)
|
||||
""")
|
||||
# Add columns introduced after initial schema (safe to run repeatedly)
|
||||
cur.execute("""
|
||||
ALTER TABLE ocr_jobs
|
||||
ADD COLUMN IF NOT EXISTS describe_text TEXT
|
||||
""")
|
||||
cur.execute("""
|
||||
ALTER TABLE ocr_jobs
|
||||
ADD COLUMN IF NOT EXISTS freeform_text TEXT
|
||||
""")
|
||||
# Unique constraint: prevent duplicate (author, chapter, page) submissions.
|
||||
# Applies only when all three fields are non-null.
|
||||
cur.execute("""
|
||||
|
||||
Reference in New Issue
Block a user