v0.1.9

Gentleman-Programming/engramv0.1.9Feb 20, 2026by Alan-TheGentleman

Upgrading?

Release notes summary

Hotfix addressing migration issues that specifically affected users upgrading from pre-0.1.8 databases.

Key Highlights

  • Fixed indexes created before columns existed causing SQL errors
  • Fixed non-constant default values in ALTER TABLE statements
  • Safe to upgrade from any previous version

New Features

  • Index creation fix
  • ALTER TABLE default value fix

Full Release Notes

## 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.

Related Repositories