SQLite Schema Design and Migration System #128
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Description
In order to validate persistence capabilities in v0,
as a Marathon developer,
I need to design and implement the SQLite schema for storing entity data and a schema versioning/migration system.
The database will store all entity component data using rkyv binary serialization for high performance and low memory overhead. Assets are NOT stored in the database.
Acceptance Criteria
Technical Approach
Database Schema
Serialization Strategy
Why Binary Blobs Over Normalized Tables
Schema Evolution
versionfield tracks serialization format versionFiles Affected
crates/libmarathon/src/persistence/schema.rscrates/libmarathon/src/persistence/migrations.rsImplementation Tasks
Future Enhancements (Out of Scope for v0)
worlds/world_<uuid>.db)Additional Context
Part of v0 Core Tech Validation. Required for persistence validation demo to function. This design prioritizes performance and memory efficiency over SQL queryability, which is the right trade-off for a game engine where entities are loaded into ECS.
Removed
bincode, serde, and reflection requirements in 99e31b1 and b421aaf.