Copied to clipboard

Flag this post as spam?

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


  • UmbracoTests 29 posts 180 karma points
    Jan 21, 2021 @ 23:25
    UmbracoTests
    0

    Upgrade error from 7.14.0 to 8.6.3

    I am trying to upgrade from 7.14.0 to 8.6.3 and I get the following error:

    The database failed to upgrade. ERROR: The database configuration failed with the following message: The constraint 'PKuser' is being referenced by table 'umbracoUser2UserGroup', foreign key constraint 'FKumbracoUser2UserGroupumbracoUserid'. Could not drop constraint. See previous errors. Please check log file for additional information (can be found in '/App_Data/Logs/')

    How is this solved?

  • Marc Goodson 2149 posts 14377 karma points MVP 9x c-trib
    Jan 22, 2021 @ 07:18
    Marc Goodson
    0

    Hi Prosper

    The new V8 database format has some new database constraints and indexes, for better performance and data integrity.

    It means certain indexes in the V7 sql tables need to be dropped, and recreated during migration.

    However historically these database indexes have not been consistently named through different releases of V7 and the migration script doesn't cope with all the previous name variations of indexes.

    You can drop the particular foreign key constraint manually and re-run the migration - if that's the only one, then all is good, but if it's just the first of many naming problems, then it could take some time to resolve.

    There is a 'Pre Migration' healthcheck: https://our.umbraco.com/packages/developer-tools/pre-migration-health-checks/ that you can install on your V7 site - that does a lot of the checking and fixing of these problems for you - so that might indentify a bunch of the issues before you attempt the migration!

    The other issues you can get is the old data, does not confirm to the new foreign key constraints/indexes = the healthcheck looks for duplicate row entries etc, too to help clean this up before the migration script stops and throws an error!

    Finally, the good folk at Proworks built a Migration 'package': https://www.nuget.org/packages/ProWorks.Umbraco8.Migrations that you install in your new V8 site before you trigger the migration - which has fixes for quite a few other migration issues that can occur.

    So I tend, to install the premigration healtcheck, fix up things it reports. Then in my new V8 site install the proworks nuget package and trigger the migration, sometimes it 'just works'!!!

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft