github Gentleman-Programming/engram v0.1.9

latest releases: v1.20.0, v1.19.0, pi-v0.1.10...
6 months ago

Hotfix — Migration fix for upgrading users

Bug Fixes

  1. Indexes created before columns existed. The CREATE INDEX statements for new columns (scope, topic_key, normalized_hash, updated_at, deleted_at) ran in the initial schema batch before the ALTER TABLE ADD COLUMN calls. This caused SQL logic error: no such column: scope for users upgrading from pre-0.1.8 databases. Fixed by removing the duplicate index definitions from the initial batch — they already existed in the correct location after the column migrations.

  2. Non-constant default in ALTER TABLE. The updated_at column migration used DEFAULT (datetime('now')), which SQLite does not allow in ALTER TABLE ADD COLUMN (only in CREATE TABLE). Changed to a constant empty-string default; the existing backfill UPDATE already sets updated_at = created_at for migrated rows.

Root Cause

Both bugs only affected users upgrading from pre-0.1.8 databases. New installations were unaffected because CREATE TABLE handles the full schema including expressions and indexes in one pass.

Notes

  • No data changes, no new features.
  • Safe to upgrade from any previous version.
  • Full test suite passing.

Don't miss a new engram release

NewReleases is sending notifications on new releases.