Copied to clipboard

Flag this post as spam?

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


  • Rune Kildahl Bentsen 8 posts 98 karma points
    Sep 28, 2017 @ 14:34
    Rune Kildahl Bentsen
    0

    uninstalling with umbracoMigrations leaves a mess

    Hello world friendly community fellows :)

    *Currently testing in umbraco version 7.7.1, but I've tried several subversions below umbraco 7.

    I've been scratching the back of my head for a while with this one. We're building a module which uses umbracoMigrations to install and uninstall, since it's the way forward and we want future upgrades to be handled through the umbracoMigrations as well to take advantage of the version control that follows with this use.

    The code we're using is actually performing quite well, it can both install and uninstall tables, data and do other custom stuff, but when we uninstall there is just 1 thing missing: The version in the umbracoMigration table in the umbraco database will NOT be removed when running a DOWN migration to version 0.0.0.

    Now I'm assuming this is a bug - or I'm missing a setting or method somewhere.

    This little "bug" means we cannot re-install the module. I've been searching for a long time for any knowledge on this matter, and I've even tried to read some of the migration code myself, but I can't really see why the migrationrunner itself doesn't clean up when running "Down" to version 0. I don't see an uninstall option anywhere either, which means it's really leaving it impossible to uninstall modules using the migrationrunner.

    Does anyone know about this issue? I don't think it's a good thing to try and work around it (like minimum version 1.0.1 or manually removing it from the database with a post petapoco script), so I really hope I'm simply missing some undocumented option somewhere.

    (btw. I've read most of the guides out there, so please don't post a link to the usual guides for using umbracoMigrations. They cover installing, upgrading and downgrading, but not uninstalling).

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Sep 29, 2017 @ 08:24
    David Brendel
    100

    Hi Rune,

    don't think there is a uninstall option for migrations as they are primarily build for doing DB updates when updating Umbraco itself. Don't think it was built in, to actually delete the last record. So you would have to delete it yourself from DB when doing the uninstallation.

    You can open a bug ticket on the issue tracker.

    Regards David

  • Rune Kildahl Bentsen 8 posts 98 karma points
    Oct 02, 2017 @ 11:10
    Rune Kildahl Bentsen
    0

    Hi Dave

    Thanks for letting me know. I don't like that "solution" but I guess it will have to do until umbraco decides to support uninstalling modules using migrations.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft