Skip to content

v0.1.9

Choose a tag to compare

@Alan-TheGentleman Alan-TheGentleman released this 20 Feb 12:40
· 716 commits to main since this release

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.