massif-press / compcon

Digital character creator and player sheets for the LANCER TTRPG
https://compcon.app
GNU General Public License v3.0
284 stars 100 forks source link

cc-userdata DB #2522

Closed jarena3 closed 2 months ago

jarena3 commented 3 months ago

PK: userID SK: datatype_itemtype_itemid

beginswith -- more general -> specific

user data (apart from meta) exists as references to s3 items: UID/savedata_itemtype : item name, size, URI, created, updated, deleted, TTL

active mode data follows similar pattern (no s3 ref): UID/activemode_itemtype_itemid: item id, savedata ref ID, active mode trackables, etc.

on load: PK query, s3 update/db update only based off updated timestamps. s3 delete (archive/ttl?) ONLY on local permanentdelete. Add option to normalize by local or by cloud -- force local updates to s3 or pull remote updates. Show diff and override by item.

Syncing should be done per item. Local dirty flag should only be based off DB item (s3 data is not relevant to this). Must ensure user items are not getting updated inappropriately.