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>
16 lines
621 B
SQL
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);
|