Build a Lambda function that manages the DMP's versions
NOTE: This should be invoked AFTER the incoming JSON has been saved because if it runs before and sets the :current_version flag to false for the prior version and then something goes wrong in the caller's code, the DMP would be left without a current version!
Fetch the current latest version for the :dmp_id
If no current version exist, set the incoming JSON's :current_version flag to true
If a current version exists
Set the latest version's :current_version flag to false
Ensure that the incoming JSON's :created date matches the prior version's
Set the incoming JSON's :current_version flag to true
Build a Lambda function that manages the DMP's versions
NOTE: This should be invoked AFTER the incoming JSON has been saved because if it runs before and sets the :current_version flag to false for the prior version and then something goes wrong in the caller's code, the DMP would be left without a current version!