An Umbraco database upgrade tip from the trenches

An Umbraco database upgrade tip from the trenches

Upon trying to help with an upgrade recently, I came across an interesting case: for some reason the site in question was impossible to upgrade, in the upgrade installer, the database upgrade would fail.

By chance, it took a long time to download the actual complete site they were trying to upgrade but I had the database backup on my machine already. Then it occurred to me: I don't really need the website, just the database!

Imagine you're upgrading from Umbraco 7.0.4 to 7.4.2, here's what you do (warning: blink and it's over!):

  • Install a fresh copy of Umbraco 7.4.2 using SQL server
  • When it's done, go into your web.config and:
    • Change the version from 7.4.2 to 7.0.4
    • Change the connection string to point to the database that you want to upgrade (the one that's still on version 7.0.4)
  • Run the upgrade installer that kicks in automatically
  • Done!

Of course you still need to upgrade the actual website with the new files and do your config merges etc, but at least you know that your custom code is not blocking the database upgrade any more.

Told you: blink and it's over!

Sebastiaan Janssen

Dutch guy living in (and loving) Copenhagen, working at Umbraco HQ. Lifehacker, skeptic, music lover, cyclist, developer.

 

1 comments on this article

Avatar for scott w scott w | December 1 2016 11:23
nice post

Add your comment