Copied to clipboard

Flag this post as spam?

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


  • jake williamson 207 posts 872 karma points
    Jan 30, 2020 @ 06:16
    jake williamson
    0

    how does v8 know to upgrade - where has the umbracoMigration table gone?!

    hey out there,

    we've ran into an interesting problem re database schema updates...

    today we upgraded a v8.3.0 site to v8.5.3. when we spun the site up locally, it went through the usual upgrade stuff.

    then we released it to our uat environment and... no upgrade prompt.

    my suspicion is that the site code knows its at v8.5.3 but the database is still at v8.3.0

    so i had a look for the umbracoMigration table in the database. my understanding was in v7 this was used to compare against the <add key="Umbraco.Core.ConfigurationStatus" value="x.x.x" /> app setting to work out if the database schema needed updating.

    thing is, that database table doesn't appear to exist in v8!

    soooooo....

    what to do?! the only thing i can think of right now is to edit the web.config changing the version number back to 8.3.0 and then spinning up the site? this should then trigger the upgrade.

    however, this is far from ideal as you have to manually remember to do this when releasing each site...

    has anyone out there any insight into this?!

    cheers,

    jake

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Jan 30, 2020 @ 07:40
    Nik
    1

    Hi Jake,

    The table is still there, well the features of it are. It's now called KeyValue table or something similar (sorry on phone so can't easily check).

    This table still stores the migration information, but is now available for other types of information to be stored in as well.

    Nik

  • jake williamson 207 posts 872 karma points
    Jan 30, 2020 @ 09:36
    jake williamson
    1

    hi nik,

    ah ha! so it is still there... the table name is umbracoKeyValue

    just took a look at my local db and it has these values:

    enter image description here

    the uat db has:

    enter image description here

    which indicates the guid value is the same for Umbraco.Core.Upgrader.State+Umbraco.Core

    curious... i wonder what that guid value is?!?! and it's very odd that it matches...

    cheers,

    jake

  • Steve Megson 151 posts 1022 karma points MVP c-trib
    Jan 30, 2020 @ 09:52
    Steve Megson
    100

    The GUID identifies the last migration step that was run on that database. There have been no new migration steps added since 8.1.0, so your upgrade from 8.3.0 to 8.5.3 wouldn't actually have made any database changes.

    If you follow the same steps for 8.6.0 (which will have new migration steps), I think you'll get an upgrade prompt on UAT saying that the site needs to be upgraded "from 8.6.0 to 8.6.0". It'll see that there's work to do on the database even though the version number matches.

  • jake williamson 207 posts 872 karma points
    Jan 31, 2020 @ 01:53
    jake williamson
    0

    hey steve/nic,

    thank you for the replies - good to know how this now works ;)

    we'll keep an eye out for v8.6.0 and double check the process.

    cheers,

    jake

Please Sign in or register to post replies

Write your reply to:

Draft