Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
sql
sql
titleSQL to check for orphan tree referencesupdate orphans with a new parent
UPDATE nested_tree_objects
SET
parentid='--some UUID of valid parent--'
WHERE
objectid IN (select objectid from nested_tree_objects
		where 
		parentid NOT IN (select objectid from nested_tree_objects))
		AND (parentid is not null or parentid <> '')