fix(core): remove runtime ALTER TABLE from vector init#728
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 1m 29s —— View job Code Review: fix(core): remove runtime ALTER TABLE from vector init
Summary: This PR correctly moves schema evolution for Checklist ResultsCode Quality & Standards
Testing & Documentation
Basic Memory Architecture
Security & Performance
Compatibility
NotesMigration + runtime bootstrap alignment is correct. The existing migration Minor observation (non-blocking): Overall: Clean, correct removal. The approach is consistent with the codebase's principle of "schema evolution in Alembic, runtime bootstrap for fresh installs only." The regression test is a good long-term guard against this pattern creeping back in. Approved. |
Summary
ALTER TABLE search_vector_chunksmigration logic from Postgres vector table initializationCREATE TABLE IF NOT EXISTSfor fresh installs_ensure_vector_tables()never alters the chunk table schema at runtimeTesting
uv run pytest tests/repository/test_postgres_search_repository_unit.pyuv run ruff check src/basic_memory/repository/postgres_search_repository.py tests/repository/test_postgres_search_repository_unit.pyuv run pytest tests/repository/test_postgres_search_repository.py::test_postgres_dimension_mismatch_triggers_table_recreation(skipped in this environment)Closes #727