Upgrading to 6.0.0 Could not drop object 'umbracoApp' because it is referenced by a FOREIGN KEY constraint
I've tried following every path to upgrade to Version 6.0.0, and most recently I've got Umbraco up to 4.11.6 from 4.7.2 and every time once I get to 6.0 I get to stage 3 of the upgrade wizard with the following error:
The database configuration failed with the following message:
Could not drop object 'umbracoApp' because it is referenced by a FOREIGN
KEY constraint.
Please check log file for addtional information (can be found in
'/App_Data/Logs/UmbracoTraceLog.txt')
I've also noticed that in the log files (with previous attempts) it throws errors about tables/columns existing in the database that are not in the schema which mostly refer to custom tables as part of our custom nodes. As of my last attempt nothing was written to this log file so I do not have the details but can try and reproduce if necessary.
I figured out this issue for anyone who comes across this problem, I had to manually go in and remove the foreign key reference for the table 'umbracoUser2app.' This was one of the two foreign keys in the schema that must not have been referenced to drop in the upgrade script. I'll need to test some more in case there are any other issues that arise but the upgrade did finally complete successfully.
Upgrading to 6.0.0 Could not drop object 'umbracoApp' because it is referenced by a FOREIGN KEY constraint
I've tried following every path to upgrade to Version 6.0.0, and most recently I've got Umbraco up to 4.11.6 from 4.7.2 and every time once I get to 6.0 I get to stage 3 of the upgrade wizard with the following error:
The database configuration failed with the following message: Could not drop object 'umbracoApp' because it is referenced by a FOREIGN KEY constraint. Please check log file for addtional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
I've also noticed that in the log files (with previous attempts) it throws errors about tables/columns existing in the database that are not in the schema which mostly refer to custom tables as part of our custom nodes. As of my last attempt nothing was written to this log file so I do not have the details but can try and reproduce if necessary.
Thanks in advance.
I figured out this issue for anyone who comes across this problem, I had to manually go in and remove the foreign key reference for the table 'umbracoUser2app.' This was one of the two foreign keys in the schema that must not have been referenced to drop in the upgrade script. I'll need to test some more in case there are any other issues that arise but the upgrade did finally complete successfully.
I am upgrading a very old Umbraco website today, and this command does the trick:
ALTER TABLE umbracoUser2app DROP CONSTRAINT umbracoUser2appFKumbracoUser2app_umbracoApp
Thanks Chris Hamer.
is working on a reply...