second-brain/alembic
Travis Herbranson 2e07d7a8fe alembic: skip CREATE SCHEMA when present + add embedding smoke test
The runtime role (lovebug) doesn't have CREATE on the petalbrain database
even though it owns the second_brain schema, so a bare
`CREATE SCHEMA IF NOT EXISTS` errors out with permission denied. Gate
the bootstrap on a pg_namespace lookup so we only attempt the create
when the schema is genuinely missing — operators bootstrap it once as
postgres superuser, alembic just respects it afterward.

The smoke test exercises the full Postgres + embedding path against a
live DB + Ollama (autoskipped otherwise): writes an extraction, embeds
the summary, asserts public.embeddings has the expected row count, and
re-embeds to verify the delete-before-insert idempotency.
2026-05-24 22:49:06 -04:00
..
versions alembic: skip CREATE SCHEMA when present + add embedding smoke test 2026-05-24 22:49:06 -04:00
env.py alembic: skip CREATE SCHEMA when present + add embedding smoke test 2026-05-24 22:49:06 -04:00
script.py.mako postgres migration: schema, models, embeddings, alembic 2026-05-24 22:46:48 -04:00