Upgrading Confluence fails and throws 'Could not determine foreign keys for NOTIFICATIONS.PAGEID column' error

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Upgrading Confluence from 4.2.x to 5.4.x fails on MySQL database and the system can't be started.

The following appears in the atlassian-confluence.log:

2014-03-31 13:53:17,733 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Could not determine foreign keys for NOTIFICATIONS.PAGEID column
com.atlassian.confluence.upgrade.UpgradeException: Could not determine foreign keys for NOTIFICATIONS.PAGEID column
at com.atlassian.confluence.upgrade.upgradetask.NotificationPageColumnUpgradeTask.dropFKConstraints(NotificationPageColumnUpgradeTask.java:108)
at com.atlassian.confluence.upgrade.upgradetask.NotificationPageColumnUpgradeTask.doUpgrade(NotificationPageColumnUpgradeTask.java:68)
...

Diagnosis

Environment

  • MySQL

Diagnostic Steps

Cause

The cause isn't known at the moment.

Resolution

  • Roll Back the database to Confluence 4.2.x version of database
  • Run the following queries:

    ALTER TABLE NOTIFICATIONS DROP FOREIGN KEY FK594ACC88C38FBEA;
    
    ALTER TABLE NOTIFICATIONS ADD CONSTRAINT FK594ACC88C38FBEA FOREIGN KEY (PAGEID) REFERENCES CONTENT (CONTENTID);
  • Proceed with the upgrade

Last modified on Nov 1, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.