U4-7131 - The database failed to upgrade: 7.2.2 to 7.3.0-RC

Created by Rasmus Eeg Møller 23 Sep 2015, 08:04:22 Updated by felinculus 06 Oct 2015, 05:14:37

Your report will have a greater chance of being addressed if you can give us clear steps to reproduce the issue, please answer the following questions in as much detail as possible: What did you do? First time install using nuget PM > Install-Package UmbracoCms -Pre

What did you expect to happen? Smooth install

What actually happened?

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.cmsPropertyType' with unique index 'IX_cmsPropertyTypeUniqueID'. The duplicate key value is (7cf1dafa-5797-5aac-3422-55154a397608).
The statement has been terminated.
 Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
   at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction)
   at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel)

Comments

Shannon Deminick 23 Sep 2015, 08:18:36

@rasmuseeg can you please try with the latest nightly ? I think this is fixed. Otherwise you'll have to send over your db for me to test since it might be that you have 'interesting' or corrupt data. http://nightly.umbraco.org/umbraco%207.3.0/


Rasmus Eeg Møller 23 Sep 2015, 08:25:05

@Shandem Should i try with this one: 9/23/2015 9:06 AM 16951823 UmbracoCms.7.3.0-beta3-nightly274.zip

Just to make sure.


Rasmus Eeg Møller 23 Sep 2015, 08:51:04

@Shandem I was unable to update with this package: UmbracoCms.7.3.0-beta3-nightly274.zip I've sent you a wetransfer request for the .bak file(SQL Server v11) to your @umbraco.com email


Shannon Deminick 23 Sep 2015, 09:16:10

Good find... I'll fix this now. The issue is that you have content types and media types with the same alias. The logic currently assumes that this will not happen.

I'll fix this up and will also need to add another upgrade script to 'fix' the data that might already be in there for some people that are using the RC.


felinculus 06 Oct 2015, 05:14:37

@Shannon.Barratt It does not seem to be fixed - experienced almost exact same error in final release of Umbraco 7.3.0 when upgrading from 7.2.8: 2015-10-06 08:05:13,742 [P484/D4/T5] ERR OR Umbraco.Web.Install.Controllers.InstallApiController - An error occurred during installation step DatabaseUpgrade System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.cmsPropertyType' with unique index 'IX_cmsPropertyTypeUniqueID'. The duplicate key value is (f0f860b2-920a-4125-5422-b625cadcb633). The statement has been terminated. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt') at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction) at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel)


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.3.0, 7.2.2

Due in version: 7.3.0

Sprint:

Story Points:

Cycle: