Project

General

Profile

Actions

Collection version history » History » Revision 4

« Previous | Revision 4/17 (diff) | Next »
Tom Clegg, 06/13/2018 05:01 PM


Collection version history

(draft)

Background: desired API features (see #13109, #13494)
  • Get current + previous versions of a collection with a single API call
  • Search all current + previous versions of collections with a single API call
  • Stable small numeric "version number" for each version of a given collection
Implementation
  • Store all versions in the collection table (much easier to do paging)
  • New database column indicates current version's UUID
  • New database column indicates user-friendly version number (starting at 1) -- can be assigned safely after locking "current" row for update
  • Assign version number to the current version -- this way {uuid,version} can be used as a permanent reference to a specific version
  • Flag for "list" API to include old versions (otherwise, filter on current_version_uuid=uuid -- might need to adjust indexes to maintain performance)
  • Flag in site configuration to enable preserving old versions in database
  • Update owner_uuid of all old versions when it changes in the current version
  • TBD: How does a permission link to the current version imply permission to an old version?
  • Prohibit permission links to old versions

Updated by Tom Clegg over 6 years ago · 4 revisions