feat: add ordered store migrations
This commit is contained in:
parent
97e9daa118
commit
bf970fdc76
3 changed files with 178 additions and 22 deletions
|
|
@ -6,6 +6,12 @@ the shared Iroh endpoint, resource registry, module routing, and local control
|
|||
socket. Control commands connect to the Unix socket and send typed JSONL
|
||||
requests.
|
||||
|
||||
The local metadata store is SQLite product state. `geth-store` tracks a numeric
|
||||
`schema_version` in the `meta` table and applies ordered migrations up to the
|
||||
crate's current schema version when the store opens. Fresh database creation and
|
||||
repeated opens are idempotent; migrations that change existing schemas run in a
|
||||
SQLite transaction where SQLite supports it.
|
||||
|
||||
Service management is also exposed through the single binary. `geth daemon
|
||||
service ...` installs and controls a user-level service definition for the local
|
||||
daemon. The initial backends are systemd user units on Linux, launchd user agents
|
||||
|
|
|
|||
|
|
@ -120,12 +120,12 @@ and downstream projects.
|
|||
Goal: treat local SQLite state as durable product data before users depend on
|
||||
it.
|
||||
|
||||
- `[ ]` Replace opportunistic schema setup with ordered migrations.
|
||||
- `[x]` Replace opportunistic schema setup with ordered migrations.
|
||||
Acceptance criteria:
|
||||
- `[ ]` The store tracks numeric schema versions.
|
||||
- `[ ]` Each migration is transactional where SQLite supports it.
|
||||
- `[ ]` Fresh database creation and repeated opens are idempotent.
|
||||
- `[ ]` Old schema fixtures migrate to the current schema in tests.
|
||||
- `[x]` The store tracks numeric schema versions.
|
||||
- `[x]` Each migration is transactional where SQLite supports it.
|
||||
- `[x]` Fresh database creation and repeated opens are idempotent.
|
||||
- `[x]` Old schema fixtures migrate to the current schema in tests.
|
||||
|
||||
- `[ ]` Make multi-table writes transactional.
|
||||
Acceptance criteria:
|
||||
|
|
|
|||
Loading…
Reference in a new issue