openactive-archive / conformance-services

Harvests and normalises OpenActive Opportunity feeds to a common representation
MIT License
0 stars 0 forks source link

When a raw item changes, we set normalised=FALSE but I think we need to flag normalised data at the same time #79

Closed odscjames closed 3 years ago

odscjames commented 3 years ago

Otherwise:

a) Raw item in b) We make normalised item id="Id290" c) Raw item updated, set normalised=FALSE d) normalised item id="id290" is now Stale, and the checks on it are Stale too? e) normalise process updates normalised item which delete check results, so now it's ok

Worst:

a) Raw item in b) We make normalised item id="Id290" c) Raw item updated, set normalised=FALSE d) We renormalise, but now the id of the item is "id952" d) normalised item id="id290" still exists in the DB, and won't be deleted!

I think when we update a raw item, we have to look for any normalised items created from it and mark them as deleted and delete any profile checks from them.

odscjames commented 3 years ago

Bug in process when raw item updated