feat: schema tracking, SHA256 integrity, identity UUID fix, 3-angle face match, cuts table, trace stranger_id

This commit is contained in:
Accusys
2026-05-16 03:10:50 +08:00
parent c41f7e0c6e
commit 5317cb4bec
13 changed files with 242 additions and 80 deletions

View File

@@ -1,10 +1,7 @@
-- Migration: Normalize chunk_id format for all chunks
-- Converts integer-format chunk_ids ('0', '1', '2', ...) to {file_uuid}_{id}
-- Date: 2026-05-15
-- Migration: Normalize chunk_id format to compact integer
-- Converts all chunk_ids to just {id} (the serial primary key)
-- The unique constraint is on (file_uuid, chunk_id), not chunk_id alone.
-- Date: 2026-05-16
-- Usage: psql -U accusys -d momentry -f migrate_fix_chunk_id_format.sql
-- Note: runs with current search_path; use SET search_path TO <schema>; for target schema
UPDATE chunk
SET chunk_id = file_uuid || '_' || id::text
WHERE chunk_id ~ '^[0-9]+$'
AND chunk_id != file_uuid || '_' || id::text;
UPDATE chunk SET chunk_id = id::text WHERE chunk_id != id::text;