-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Milestone
Description
Problem
Any updates to the schema of a substate are breaking.
The database may update the schema internally, using the normal methods, but this must
change must never result in a different state hash for the substate.
Proposal 1
Add version enums to all substates. These versions are never "upgraded" but remain at the version
at creation time. Any new substates will default to the latest version (for e.g, an V1 substate is downed, then upped as V2).
Pros:
- Flexibility to change and improve substates schema
- Substates can "lazily" upgrade as needed
Cons:
- Versions must be forever maintained
- Extra layer of indirection within the SubstateValue type (code complexity)
Considerations:
- Substates should always be upgradable between schemas. e.g. if adding a field, it must always have a correct default (
Option<NewField>etc) - Substates are not downgradable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog