Skip to content

v1.0.77 — G40 fix: applied_on = NULL blocks all migrations

Latest

Choose a tag to compare

@daniloaguiarbr daniloaguiarbr released this 09 Jun 15:04
· 1 commit to main since this release

Critical Bugfix

v1.0.76 migrate --rehash inserted rows into refinery_schema_history without the applied_on field, leaving it NULL. The refinery-core 0.9.1 rusqlite driver reads this field as String (NOT NULL), crashing with InvalidColumnType(Null at index: 2) on any subsequent migration. All migrations were blocked (exit 20).

How to Upgrade

cargo install sqlite-graphrag --version 1.0.77 --force
sqlite-graphrag migrate

No manual SQL intervention needed — v1.0.77 automatically detects and fixes NULL rows.

Changes

Fixed

  • run_rehash INSERT now always includes applied_on with RFC3339 timestamp via chrono::Utc::now()
  • sanitize_null_applied_on helper runs UPDATE on NULL rows before any migration runner call
  • remove_vec_virtual_tables_without_module cleans orphan vec0 virtual tables via PRAGMA writable_schema when vec0 module is absent (LLM-only build)
  • debug-schema no longer crashes on databases with applied_on = NULL — field changed from String to Option<String>

Added

  • null_rows_fixed field in migrate --rehash JSON response
  • null_rows_fixed and vec_tables_removed_via_writable_schema fields in migrate --to-llm-only JSON response
  • 4 unit tests + 2 integration tests covering the fix
  • ADR-0027 documenting the G40 root cause and resolution (EN + PT-BR)

Documentation

  • CHANGELOG, MIGRATION, TESTING, AGENTS, COOKBOOK, DOCUMENTATION_FRAMEWORK updated
  • 3 JSON schemas updated (migrate-rehash, migrate-to-llm-only, debug-schema)

Full Details