Skip to content

DMP Versioning

Brian Riley edited this page Jul 20, 2024 · 1 revision

<- Home

DMP versioning strategy

As noted in the Database Wiki page, the latest version of the DMP always has the Sort Key (SK) of VERSION#latest. Prior versions use the modified value of the DMP at the time of the update VERSION#2022-12-15T11:42:15+00:00.

Versioning diagram

A DMP is versioned under the following circumstances:

  • When a change is made by a user/system that did not create the original DMP record.
  • When the creator of the DMP makes a change.

A DMP is NOT versioned under the following circumstances:

  • The metadata (aside from the modified timestamp) is the same as the current latest version
  • The last modification was made less than an hour ago. This prevents situations where an external system sends updates every time the user clicks 'save' (e.g. if they add 3 new contributors over the course of 10 minutes, this will only result in 1 new version)

For example:

  • 2023-01-01 09:00:00 - The DMPTool creates the initial DMP :: record becomes VERSION#latest
  • 2023-01-25 14:32:21 - The DMPTool sends an update that includes a new contributor entry :: new record becomes VERSION#latest and the old initial record becomes VERSION#2023-01-01T09:00:00+00:00
  • 2023-01-25 14:42:13 - The DMPTool sends an update that includes a change to the title :: no version - less than an hour old :: VERSION#latest is updated directly
  • 2023-01-25 16:12:17 - The DMPTool sends an update that includes updated funder info :: new record becomes VERSION#latest and the old VERSION#latest becomes VERSION#2023-01-25T14:42:13+00:00
  • 2023-01-25 16:13:00 - A Funder system sends an update that includes a grant id/url :: new record becomes VERSION#latest and the old VERSION#latest becomes VERSION#2023-01-25T16:12:17+00:00

When fetching the DMP ID metadata, the JSON record will include a dmphub_versions array that contains links to all of the versions available. For example, if we consider the timeline above the system would have:

{
  "modified": "2023-01-25T16:13:00+00:00",
  "dmphub_versions": [
    {
      "timestamp": "2023-01-25T16:13:00+00:00",
      "url": "https://example.com/api/v0/dmps/10.12345/A1.1A2B3C4D6?version=2023-01-25T16:13:00+00:00"
    },
    {
      "timestamp": "2023-01-25T16:12:17+00:00",
      "url": "https://example.com/api/v0/dmps/10.12345/A1.1A2B3C4D6?version=2023-01-25T16:12:17+00:00"
    },
    {
      "timestamp": "2023-01-25T14:42:13+00:00",
      "url": "https://example.com/api/v0/dmps/10.12345/A1.1A2B3C4D6?version=2023-01-25T14:42:13+00:00"
    },
    {
      "timestamp": "2023-01-01T09:00:00+00:00",
      "url": "https://example.com/api/v0/dmps/10.12345/A1.1A2B3C4D6?version=2023-01-01T09:00:00+00:00"
    }
  ]
}
Clone this wiki locally