Confluence Update Failed : failed during the SCHEMA_ UPGRADE phase

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`))

 

 

 

 

1 answer

0 vote

Hi there,
I found the same symptoms about this issue in the following documentation. You could execute the workaround described in it.

Cheers,

Hi, Thank you for the reply. I know this page and I attempt to follow the steps but from the first line I do not have any duplication. This Query return empty result set. that means no problematic row according to the workaround. SELECT CONTENT_ID, CONT_PERM_TYPE, COUNT(CONTENT_ID) FROM CONTENT_PERM_SET GROUP BY CONTENT_ID, CONT_PERM_TYPE HAVING COUNT(*) > 1;

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

685 views 21 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you