Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MK 429 posts 906 karma points
    Sep 23, 2014 @ 14:58
    MK
    0

    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

  • MK 429 posts 906 karma points
    Sep 28, 2014 @ 09:36
    MK
    0

    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

     

  • MK 429 posts 906 karma points
    Sep 29, 2014 @ 11:35
    MK
    0

    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

  • Wesley de Roo 38 posts 142 karma points
    Oct 01, 2014 @ 11:46
    Wesley de Roo
    0

    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.

  • MK 429 posts 906 karma points
    Oct 01, 2014 @ 11:51
    MK
    0

    Can you please vote for this issue:

    http://issues.umbraco.org/issue/U4-5557

    Thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies