Upgrading Confluence fails and throws 'Could not determine foreign keys for NOTIFICATIONS.PAGEID column' error
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
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) ...
- Check the DDL of NOTIFICATION table to ensure
CONSTRAINT FK594ACC88C38FBEA FOREIGN KEY (PAGEID) REFERENCES CONTENT (CONTENTID)exists
- Run the instructions in the article: How to Fix the Collation and Character Set of a MySQL Database
- Roll back the upgrade and perform the upgrade again after starting Confluence by adding System Properties' parameter:
The cause isn't known at the moment.
- 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