Im trying to upgrade my 6.1.6 ver to 6.2.2 but geting the following error:
The database configuration failed with the following message: Violation of PRIMARY KEY constraint 'PK_cmsContentXml'. Cannot insert duplicate key in object 'dbo.cmsContentXml'. The statement has been terminated. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
Don't know why. But can confirm that i'am having the same error. Updating 6.1.6 to 6.2.2 (tried 6.2.1, same problem).
Umbraco.Core.DatabaseContext - [Thread 6] Database configuration failed with the following error and stack trace: Violation of PRIMARY KEY constraint 'PK_cmsContentXml'. Cannot insert duplicate key in object 'dbo.cmsContentXml'. The duplicate key value is (12110).
12110 is indeed a media item, deleted de mediaitem resulting in same error with key 12111.
Upgrade 6.1.6 to 6.2.2 Error
Hi there,
Im trying to upgrade my 6.1.6 ver to 6.2.2 but geting the following error:
The database configuration failed with the following message: Violation of PRIMARY KEY constraint 'PK_cmsContentXml'. Cannot insert duplicate key in object 'dbo.cmsContentXml'. The statement has been terminated. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
Any idea?
Regards,
Moshe
Ok so Ive managed to track down the error to MigrationRunner.cs file in line 84:
Migrated.RaiseEvent(new MigrationEventArgs(migrations, migrationContext, _currentVersion, _targetVersion, false), this);
Any idea on why the RaiseEvent faild or whats the use of it?
Regards,
Moshe
Ok so ive managed to find te following:
The fails to complete the BulkInsertRecords for media in PetaPocoExtensions.cs
Im on SQL 2008R2 so it will go via:
string[] sqlStatements;
var cmds = db.GenerateBulkInsertCommand(collection, db.Connection, out sqlStatements);
for (var i = 0; i < sqlStatements.Length; i++)
{
using (var cmd = cmds[i])
{
cmd.CommandText = sqlStatements[i];
cmd.ExecuteNonQuery();
}
}
Does anyone know why its trying to insert the media again?
Regards,
Moshe
Don't know why. But can confirm that i'am having the same error. Updating 6.1.6 to 6.2.2 (tried 6.2.1, same problem).
Umbraco.Core.DatabaseContext - [Thread 6] Database configuration failed with the following error and stack trace: Violation of PRIMARY KEY constraint 'PK_cmsContentXml'. Cannot insert duplicate key in object 'dbo.cmsContentXml'. The duplicate key value is (12110).
12110 is indeed a media item, deleted de mediaitem resulting in same error with key 12111.
Can you please vote for this issue:
http://issues.umbraco.org/issue/U4-5557
Thanks
is working on a reply...