Branch submission schema error on DM Upgrde >v4.4
Overview
Before the 4.4 release of Deployment Manager the database table which Merge Request instances are stored in did not have a primary key constraint. This meant that it was possible to have duplicate instances created. For the most part, this was not an issue because the Pega Platform would treat any duplicates as an update to the existing record. Under rare circumstances the Pega Platform will revert to an older behavior which will insert duplicate entries instead.
Changes in DM 4.4
Deployment Manager 4.4 adds a primary key constraint to the Merge Request table. This schema change will be applied automatically when importing the latest version of PegaDevOpsFoundation. If your system happens to have duplicate Merge Requests, applying the Schema change will fail.
Fix for duplicate Instances
Along with the schema changes, we have included in PDF 4.4 an activity called pzDeleteDuplicateMergeRequests which will automatically delete any merge Requests which have duplicates. To use that activity, and proceed with the PDF follow these steps.
- Import PDF 4.4, and choose to skip Schema updates
- Open the activity pzDeleteDuplicateMergeRequests
- Run the activity without checking the “PerformDelete” checkbox
- You acknowledge that all of the Merge Request instances shown in the resulting XML will be deleted.
- Run the activity again checking the “PerformDelete” checkbox
- Re-import PDF 4.4 so that the schema changes can be applied.