DATA-004 follow-up: capture legacy schema patches as migration 0002 #241

Closed
opened 2026-07-16 07:08:50 +00:00 by Mark · 0 comments
Owner

Background

DATA-004 (Issue #166) implemented a versioned migration framework (MigrationRunner), but the initial 0001_initial_schema migration only captures the base schema DDL. Several ad-hoc schema patches that were previously applied via SchemaManager._add_column_if_missing() are not yet captured as versioned migrations.

Known missing patches

  • agents.embedding column (added for semantic search)
  • Various columns added by _add_column_if_missing() calls in the old schema.py
  • transactions.storage_duration_days column

Acceptance criteria

  • Audit all _add_column_if_missing calls from the old substrate/ledger/schema.py (git show HEAD~1:substrate/ledger/schema.py | grep _add_column_if_missing)
  • Capture each as a forward + backward migration in substrate/ledger/migrations.py
  • Verify pytest tests/unit/test_embedding_ledger.py -x -q passes
## Background DATA-004 (Issue #166) implemented a versioned migration framework (MigrationRunner), but the initial `0001_initial_schema` migration only captures the base schema DDL. Several ad-hoc schema patches that were previously applied via `SchemaManager._add_column_if_missing()` are not yet captured as versioned migrations. ## Known missing patches - `agents.embedding` column (added for semantic search) - Various columns added by `_add_column_if_missing()` calls in the old `schema.py` - `transactions.storage_duration_days` column ## Acceptance criteria - [ ] Audit all `_add_column_if_missing` calls from the old `substrate/ledger/schema.py` (git show HEAD~1:substrate/ledger/schema.py | grep _add_column_if_missing) - [ ] Capture each as a forward + backward migration in `substrate/ledger/migrations.py` - [ ] Verify `pytest tests/unit/test_embedding_ledger.py -x -q` passes
Mark closed this issue 2026-08-12 09:34:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#241
No description provided.