Files
sciagent/be0/migrations/022_imagehub_task_annotations.sql
T
Thinh Lam 688fac73e9
CI/CD / backend (push) Failing after 2m8s
CI/CD / frontend (push) Failing after 1m40s
CI/CD / deploy (push) Has been skipped
sciagent code + Gitea Actions CI/CD
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:38:30 +07:00

9 lines
721 B
SQL

-- ImageHub: a task's labeler annotations (bbox / points / pen / brush / polygon) stored as JSON.
-- The shared viewer's annotation overlay emits normalized [0..1] vector geometry per slice — small
-- JSON, persisted on the task so the AnnotationTool can load + save a labeler's work. Idempotent
-- (ADD COLUMN IF NOT EXISTS) so the startup runner can apply it to volumes that predate it. Apply
-- after 021 (no semicolons inside comments or string literals — the runner splitter is naive):
-- docker exec -i initiative-postgres psql -U initiative -d initiatives < be0/migrations/022_imagehub_task_annotations.sql
ALTER TABLE imagehub_tasks ADD COLUMN IF NOT EXISTS annotations JSONB NOT NULL DEFAULT '[]'::jsonb;