periodo-client
periodo-client copied to clipboard
Protect against accidental creation of duplicates
Currently the following not-unreasonable workflow can result in accidentally creating duplicates in PeriodO:
- I create a new local database, and sync a period collection from the canonical dataset.
- I add some new periods to this collection in my local database and submit a patch.
- The patch gets merged. Great!
- Now I add some more new periods to the collection in my local database, thinking that it is "in sync" when actually it still has skolem IDs for the merged new periods.
- I submit a new patch, not realizing that it is a superset of my earlier, already merged patch.
Possible solution: give backends a GUID, store it with submitted patches, and before allowing patch submission from a backend, query for merged patches that resulted in new URIs, and update the skolem IDs (this assumes we are keeping that mapping around when we deskolemize).