docs: add REFERENCE docs, M4 workspace, Caddyfile

This commit is contained in:
Accusys
2026-05-16 03:11:32 +08:00
parent 5317cb4bec
commit 3a6c186575
29 changed files with 4276 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
-- Migration: Add stranger_id column for unmatched face traces
-- Unmatched traces get stranger_id = trace_id (per-file sequential integer)
-- Unique constraint: (file_uuid, stranger_id) WHERE stranger_id IS NOT NULL
-- Date: 2026-05-16
-- Usage: psql -U accusys -d momentry -f migrate_add_stranger_id.sql
ALTER TABLE face_detections ADD COLUMN IF NOT EXISTS stranger_id INTEGER;
CREATE UNIQUE INDEX IF NOT EXISTS idx_face_detections_stranger
ON face_detections (file_uuid, stranger_id) WHERE stranger_id IS NOT NULL;
-- Assign stranger_id = trace_id for existing unmatched traces
UPDATE face_detections SET stranger_id = trace_id
WHERE trace_id IS NOT NULL AND identity_id IS NULL AND stranger_id IS NULL;