feat(persistence): EventStore & SQLite migrations #29
No reviewers
Labels
No labels
area:config
area:contracts
area:engine
area:eventsourcing
area:frontend
area:git
area:ipc
area:persistence
area:provider
area:scaffold
area:terminal
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/peon!29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
crates/backend/migrations/001_initial.sqlwith the full initial schema: append-onlyeventstable, denormalised projection tables (projection_projects,projection_threads,projection_turns,projection_messages),checkpoints,settings, and covering indexes.crates/backend/src/orchestration/events.rsdefiningOrchestrationEvent(all variants with#[serde(tag = "type")]),event_type_name()discriminant helper, andStoredEventwrapper.crates/backend/src/persistence/event_store.rswithEventStore:open(path)— creates DB file if missing and runs migrations viasqlx::migrate!().new(pool)— thin constructor for in-memory test pools.append_all(events)— atomic transaction; returnsVec<StoredEvent>with auto-assigned sequence numbers.replay_all()— reads all events in sequence order for startup read-model reconstruction.Closes #5
Pull request closed