Bug Description
The Alembic migration d7e8f9a0b1c2_add_structured_metadata_indexes.py (introduced in v0.18.1) fails on SQLite because it attempts to add a STORED generated column via ALTER TABLE, which SQLite does not support.
SQLite only allows adding VIRTUAL generated columns with ALTER TABLE ADD COLUMN, not STORED ones. See: https://www.sqlite.org/lang_altertable.html
Error
OperationalError: (sqlite3.OperationalError) cannot add a STORED column
[SQL: ALTER TABLE entity ADD COLUMN tags_json TEXT GENERATED ALWAYS AS
(json_extract(entity_metadata, '$.tags')) STORED]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Steps to Reproduce
- Have an existing basic-memory database created with v0.18.0 or earlier
- Upgrade to v0.18.1 (
uvx basic-memory mcp --project <project>)
- Server fails to start during database migration
Workaround
Pin to v0.18.0 in .mcp.json:
{
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory==0.18.0", "mcp", "--project", "my-project"]
}
}
}
Environment
- basic-memory version: 0.18.1
- Python: 3.12.11
- OS: Arch Linux (kernel 6.17.7)
- SQLite: system default
Bug Description
The Alembic migration
d7e8f9a0b1c2_add_structured_metadata_indexes.py(introduced in v0.18.1) fails on SQLite because it attempts to add aSTOREDgenerated column viaALTER TABLE, which SQLite does not support.SQLite only allows adding
VIRTUALgenerated columns withALTER TABLE ADD COLUMN, notSTOREDones. See: https://www.sqlite.org/lang_altertable.htmlError
Steps to Reproduce
uvx basic-memory mcp --project <project>)Workaround
Pin to v0.18.0 in
.mcp.json:{ "mcpServers": { "basic-memory": { "command": "uvx", "args": ["basic-memory==0.18.0", "mcp", "--project", "my-project"] } } }Environment