Lethe docs · Migration & Upgrading

Migration & Upgrading

Version migrations

Schema migrations are additive and run automatically at startup. The supported path today:

Always back up before upgrading (sqlite3 <db> ".backup <out>.db" + PRAGMA integrity_check;), pin image tags, and keep the previous tag plus the pre-upgrade backup as the rollback path.

Legacy events ↔ Memory Git

The two memory systems are separate tables with separate histories. Migrating to Memory Git does not rewrite or import legacy events:

Moving an existing deployment to Memory Git

  1. Keep the legacy instance running (its data is unaffected).
  2. Start a git-mode instance with a fresh data directory — never point git mode at the OpenLethe data directory (scripts/prepare-local-memory-git-env.sh + docker-compose.git.yml).
  3. Add Charon when you want scoped, reviewed writes; reconcile author/reviewer/reader principals per project.
  4. Re-record durable knowledge as changesets on owned refs and merge through review (bulk import is intentionally absent — reviewed memory is written, not dumped).
  5. Retire the legacy instance when its sessions close out, or keep it for session continuity alongside (hybrid).

Upgrading the deployment shape

Rollback

  1. Stop the container.
  2. Restore the pre-upgrade backup over the data file.
  3. Start the previous pinned image tag.
  4. Verify health and a representative read path before resuming writes.