Upgrading to Umbraco 10
# help-with-umbraco
t
Hi I'm trying to upgrade my Umbraco 8 (latest version) to Umbraco 10 (latest version too) I started off making a backup of the database. Created a new Umbraco 10 empty website. Added the connection string to appsettings.json file. Added the unattended installation config to the same file. Built the site and ran it. It threw a few errors about the database migration and wondering if I'm doing this incorrectly? Is there a process I should be following? Thanks
t
Yes, that was the video I was following. Maybe I misinterpreted some step. Is this correct: 1. Get the Umbraco 8 database and restore it. 2. Create a new empty Umbraco 10 project with No Database. 3. Add the automated installation to the appsettings. 4. Add connection string which connects to the database in step 1. 5. Load the site up and this would run the database update.
s
Sounds about right, I just wanted to point you to the documentation. 🙂
So best let people know the errors you're getting then maybe we can help
t
Ok let me start the process again as I've changed a few settings during the process in order to try and resolve. 👍
I attempted this again and the error is BootFailedException: An error occurred while running the unattended upgrade. The database configuration failed with the following message: There are no primary or candidate keys in the referenced table 'cmsContentType that match the referencing column list in the foreign key 'FK umbracoContentVersionCleanupPolicy.cmsContentType nodeld. Could not create constraint or index. See previous errors. I created the database by generating scripts and ticking script indexes. This produces a very large SQL file (almost 7GB). I run the file through SQLCmd and then receive a new error half way through the process Incorrect syntax near 'XXXX I rerun the command spending -a 32767 as per recommendation over the internet, which brings back the same error but different line.... Anyone know what's going wrong here?
s
There are no primary or candidate keys in the referenced table 'cmsContentType that match the referencing column list in the foreign key 'FK umbracoContentVersionCleanupPolicy.cmsContentType nodeld.
Something in
cmsContentType
is referencing something in
umbracoContentVersionCleanupPolicy.cmsContentType
that doesn't exist (or vice versa). Can't remember the exact query but something with a
WHERE NOT EXISTS
between tables should give you something to look into.
Guessing a contenttype was removed but it is still being referenced in
umbracoContentVersionCleanupPolicy
somewhere.
t
I'll Google around to see if I can find something on this. The database is going from the version of Umbraco 8 directly to Umbraco 10 (NOT 9) - is that ok that I've missed version 9?
s
No it is likely that you have some data corruption. Before v8, we haven't been very great at making sure database data doesn't get corrupt, so sometimes you'll need to clean up for going to v10.
People often do the v9 step, but I feel it's a bit of "superstition" (the migrations needing to run exist for v9 as well as v10 and haven't changed). So by all means if you want to try v9 first, try to install a blank version of the newest v9 and do the steps you've been doing and I expect you get the same error. Alternatively, as @marcemarc mentions here https://our.umbraco.com/forum/using-umbraco-and-getting-started/111453-what-would-be-my-simplest-upgrade-from-8-to-11#comment-344734 you could go the uSync route: > The Alternative approach to avoid the multiple steps, would be to install uSync + uSync Content Edition and do a full export of the site. > This creates a set of XML files containing your content and definitions of Doc Types > Then in a fresh install of V11 install uSync + uSync Content edition, copy across your uSync files from the V8 site, and run a full Import. > Depending on the complexity of the site this can work quite well, but you lose things like editing history etc
t
I found a script to add the versioning table/key and that allowed me to progress with the upgrade..... Eventually I got into the back office but the Deploy dashboard is missing. I think that maybe for Umbraco Azure versions? Thanks for your help!
s
Yeah I'm assuming you're not on Umbraco Cloud and that video is aimed at Umbraco Cloud people it looks like
5 Views