Project

General

Profile

Bug #17152

Updated by Peter Amstutz over 3 years ago

When a collection snapshot is created (recording a version), it appears that modified_at gets set to that point in time.    However, because created_at is when version 1 is created, and the same for every snapshot, we don't have a field that tells us when the _content_ of that snapshot came into existence. 

 In other words, the modifed_at timestamp of a collection snapshot at version N is actually the point in time when version N+1 was created.    This is not what we want. 

 Fix the API server so that snapshots get the modified_at of the collection at the moment the snapshot is taken. 

 Write a migration that adjust the existing modified_at fields when versioning is enabled.    The modified_at of version N should take the modified_at of version N-1.    The "modified_at" of version 1 should take the value of "created_at". 


 Related thing to fix: there's currently an option that delays making snapshots on updates.    However, sometimes the client knows better and you want every change to create a new snapshot.    The "preserve_version" flag seems like it should do that, but actually it doesn't (???) so either we need to adjust the behavior of that flag to have the expected behavior, or we need a new flag. 

 It would probably make sense for "preserve_version" flag to both ensure that the previous version is snapshotted, as well as indicating that the new version should be snapshotted when updated as well. 

Back