Portal Registry Migration Fix

development peopletools Apr 05, 2022

Dan Iverson

Sometimes when migrating Portal Registry objects I find that they do not show up in the Navigator, or even Structure and Content, until I clear cache, run VERSION, or even make a nominal change to the Portal Registry. We talked about this on the podcast in episode #303. I took Kyle’s idea of adding a sibling record in Structure and Content and traced what SQL was changing when saving the sibling record. There were INSERT statements for the new CREF, but there are also some important VERSION updates.

  1. Update overall VERSION to track the new changes
  2. Update the VERSION specifically for the Portal Registry object types
  3. Update the VERSION for the parent Portal Registry folder (in my case, the Root folder)

Below is a script I use with Phire; we execute this script after the object migration to make sure our new CREFs are visible.

-- Update overall VERSION for SYS and PRSM types
update PSVERSION set VERSION = VERSION + 1 where OBJECTTYPENAME in ('SYS','PRSM');

-- Update VERSION for Portal Registry objects
UPDATE PSLOCK SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME = 'PRDM';
UPDATE PSLOCK SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME = 'PRSM';

-- Update CREF Parent - Change PORTAL_OBJNAME as needed
UPDATE PSPRSMDEFN SET VERSION = (select VERSION from PSLOCK where OBJECTTYPENAME = 'PRSM'),  LASTUPDDTTM = TO_TIMESTAMP(sysdate,'YYYY-MM-DD-HH24.MI.SS.FF')  WHERE PORTAL_NAME = 'EMPLOYEE' AND PORTAL_REFTYPE = 'F' AND PORTAL_OBJNAME = 'PORTAL_ROOT_OBJECT';

commit;

Thanks for Andy Dorfman for catching a change in my original SQL. The first statement should include both the SYS and PRSM types.

 


Note: This was originally posted by Dan Iverson and has been transferred from a previous platform. There may be missing comments, style issues, and possibly broken links. If you have questions or comments, please contact [email protected].