Files
rbv/migrations/0006_faces.sql
rob thijssen a27d636b88 Initial commit: rbv workspace with ingest, API, UI, and ML client
Rust workspace with crates for entity types, hashing, database access,
ML client (immich-ml compatible), ingest pipeline, clustering, auth,
search, CLI, and axum API server. Vite/React UI. SQL migrations.
Includes retry/backoff on transient ML API connection errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 16:51:50 +02:00

16 lines
621 B
SQL

CREATE TABLE face_detections (
id BYTEA PRIMARY KEY,
image_id BYTEA NOT NULL REFERENCES images(id) ON DELETE CASCADE,
x1 INT NOT NULL,
y1 INT NOT NULL,
x2 INT NOT NULL,
y2 INT NOT NULL,
score REAL NOT NULL,
embedding vector(512) NOT NULL,
person_id UUID REFERENCES persons(id) ON DELETE SET NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX idx_fd_image ON face_detections(image_id);
CREATE INDEX idx_fd_person ON face_detections(person_id);