Switch the default database from SQLite to Postgres + pgvector (via pgvector/pgvector:pg16 Docker image) to support the upcoming vision pipeline (embeddings, OCR, object detection, face clustering). - Add `db` service to docker-compose.yml with healthcheck - Wire `alembic upgrade head` into backend CMD before uvicorn - Bootstrap empty 0001_baseline revision (schema still owned by create_all) - Guard SQLite-only PRAGMAs and inline ALTERs behind _is_sqlite flag - Run `CREATE EXTENSION IF NOT EXISTS vector` on Postgres init - Add asyncpg, psycopg2-binary, pgvector to requirements - Provide docker-compose.sqlite.yml escape hatch for legacy SQLite mode Fresh DB + rescan assumed — no SQLite→Postgres data migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
959 B
959 B