Add support for versioning schemas
oubiwann opened this issue · comments
- All records need to be versioned:
- Metadata
- Creds
- EncryptedRecord
- DecryptedRecord
- The DB struct itself needs to be versioned, too
- The version to use needs to be configurable
- Attempting to load records with with different versions than configured needs to err-out
- Alternatively, the use may be prompted to upgrade and/or downgrade
- Migrations to/from versions need to be supported
- DBs and records of specific versions need to be easily created
- Add an
auto-upgrade
flag to the CLI
Ohhhh, nice: https://github.com/doctorn/obake
Some example usage which might be useful: https://github.com/xaynetwork/xayn_ai/blob/9f4edfec4ddf25b718fffa404a2248681facfd24/xayn-ai/src/reranker/database.rs
Ugh, not so nice. Also, been reading advice against this sort of approach by Rustaceans. Might just have a policy / convention for users to "export before you upgrade; upgrade, then import" ...
Yeah ... not going to do this.