src/db/schema.sql is not included in the built package — pipx installs cannot bootstrap the base schema
Summary
The pip/pipx-installed package ships the incremental migrations (src/db/migrations/*.sql) but not the base schema file src/db/schema.sql. Any install path that doesn't go through the Docker stack has no way to create the core tables (memory, etc.) from the installed package alone.
Environment
- open-brain installed via
pipx install 'git+https://github.com/benclawbot/open-brain.git' (v1.0.0/1.0.1, master as of 2026-07-31)
- Python 3.12, Ubuntu (WSL2), external PostgreSQL 17 + pgvector (no Docker)
Reproduction
$ pipx install 'git+https://github.com/benclawbot/open-brain.git'
$ ls ~/.local/share/pipx/venvs/openbrain/lib/python3.12/site-packages/src/db/
migrations/ ... # <-- no schema.sql
$ ls .../src/db/migrations/
002_continuity_foundation.sql ... 015_embedding_dim_change.sql # 002-015 only, no 001/base
With no base schema applied, openbrain store fails:
Error: relation "memory" does not exist
(or, if a partial/hand-made memory table exists, migrations 014/015 ALTER it and mask the problem until an INSERT fails with column "source" of relation "memory" does not exist.)
Root cause
pyproject.toml package-data only globs the migrations directory:
[tool.setuptools.package-data]
config = ["*.yaml", "*.yml"]
"src.db" = ["migrations/*.sql"]
src/db/schema.sql matches neither pattern, so it's excluded from the wheel. The migration chain also starts at 002_ — there is no 001_ migration that creates the base tables, so the migrations alone can never bootstrap an empty database; they assume schema.sql was applied first (which only the Docker startup path does).
Suggested fix
Either (a) include the schema in package-data and have openbrain configure apply it before migrations:
"src.db" = ["schema.sql", "migrations/*.sql"]
or (b) convert schema.sql into a proper 001_base_schema.sql migration so the existing migration runner bootstraps empty databases with no special case.
Workaround
Download src/db/schema.sql from the repo and apply it manually with psql -f before using the CLI.
src/db/schema.sqlis not included in the built package — pipx installs cannot bootstrap the base schemaSummary
The pip/pipx-installed package ships the incremental migrations (
src/db/migrations/*.sql) but not the base schema filesrc/db/schema.sql. Any install path that doesn't go through the Docker stack has no way to create the core tables (memory, etc.) from the installed package alone.Environment
pipx install 'git+https://github.com/benclawbot/open-brain.git'(v1.0.0/1.0.1, master as of 2026-07-31)Reproduction
With no base schema applied,
openbrain storefails:(or, if a partial/hand-made
memorytable exists, migrations 014/015ALTERit and mask the problem until an INSERT fails withcolumn "source" of relation "memory" does not exist.)Root cause
pyproject.tomlpackage-data only globs the migrations directory:src/db/schema.sqlmatches neither pattern, so it's excluded from the wheel. The migration chain also starts at002_— there is no001_migration that creates the base tables, so the migrations alone can never bootstrap an empty database; they assumeschema.sqlwas applied first (which only the Docker startup path does).Suggested fix
Either (a) include the schema in package-data and have
openbrain configureapply it before migrations:or (b) convert
schema.sqlinto a proper001_base_schema.sqlmigration so the existing migration runner bootstraps empty databases with no special case.Workaround
Download
src/db/schema.sqlfrom the repo and apply it manually withpsql -fbefore using the CLI.