storage rewrite wip

This commit is contained in:
BuckarooBanzay 2023-03-27 19:40:37 +02:00 committed by Athozus
parent e08238f50e
commit 894e5df4b1
No known key found for this signature in database
GPG key ID: B50895022E8484BF
7 changed files with 62 additions and 148 deletions

View file

@ -29,6 +29,18 @@ To provide a web-based interface to receive/send mails you can use the [mtui](ht
To access your mail click on the inventory mail button or use the "/mail" command
Mails can be deleted, marked as read or unread, replied to and forwarded to another player
# Compatibility / Migration
Overview:
* `v1` all the data is in the `<worldfolder>/mails.db` file
* `v2` every player has its own (in-) mailbox in the `<worldfolder>/mails/<playername>.json` file
* `v3` every player has an entry in the `<playername>` modstorage (inbox, outbox, contacts)
Mails in the v1 format are supported until commit `b0a5bc7e47ec1c75339e65ec07d0a0ac2b17288b`.
Everything after that assumes either the v2 or v3 is used.
For a v1 to v3 migration the version in `b0a5bc7e47ec1c75339e65ec07d0a0ac2b17288b` has to be at leas run once (startup).
# Dependencies
* None