When a Primary key is changed how will you handle old cases?
The recommendation is to keep it consistent for older and new records with respect to Primary key changes. You may have to run one time utility to change the Primary key for the older records.
If you’re thinking of modifying primary keys for old cases - in my opinion, that’s not recommended and not supported directly in Pega.
If it’s absolutely mandatory (rare case):
-
It has to be done as a full data migration (offline approach)
-
You would need to update:
-
Work tables
-
Assignments
-
History tables
-
Index tables
-
Any exposed references / external systems
-
-
Typically done using DB scripts, not from Pega rules
Safer alternative (recommended):
-
Keep old cases as-is
-
Introduce a new business key and handle mapping
you could use alternative key? it will mean you can move to the new key for new records but still keep the primary key on the class?
I have no done this but in the Constellation world I commonly see this configuration underutilised. Given its at the datapage level, offers a little more flexibility to introduce change.
