I am trying to upgrade from Confluence 5.0.3 to 5.8.9 but I face this error:
2015-09-01 10:02:43,127 INFO [localhost-startStop-1]
[confluence.upgrade.upgradetask.UserKeyReferenceUpgradeTask]
updateUsernameReferences Updating CONTENT_PERM table
[atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: StatementCallback;
SQL
[UPDATE CONTENT_PERM SET USERNAME = COALESCE((SELECT um.user_key FROM
user_mapping um WHERE CONTENT_PERM.USERNAME = um.lower_username),
CONTENT_PERM.USERNAME),
CREATOR = COALESCE((SELECT um.user_key
FROM user_mapping um WHERE CONTENT_PERM.CREATOR = um.lower_username),
CONTENT_PERM.CREATOR),
LASTMODIFIER = COALESCE((SELECT um.user_key
FROM user_mapping um WHERE CONTENT_PERM.LASTMODIFIER =
um.lower_username), CONTENT_PERM.LASTMODIFIER)];
Cannot add or
update a child row: a foreign key constraint fails
(`confluence`.`content_perm`, CONSTRAINT `FKBD74B31676E33274` FOREIGN
KEY (`CPS_ID`)
REFERENCES `content_perm_set` (`ID`)); nested
exception is
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Cannot
add or update a child row: a foreign key constraint fails
(`confluence`.`content_perm`, CONSTRAINT `FKBD74B31676E33274` FOREIGN
KEY (`CPS_ID`)
REFERENCES `content_perm_set` (`ID`))