Announcement

Collapse
No announcement yet.

What's the best way to downgrade a module to the last stable version?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What's the best way to downgrade a module to the last stable version?

    I'm working on a major update to my shipping module that will add some nice new features, and it will have a slightly higher version number. From what I've seen, if I upload a module that has a lower version number than whatever is currently installed, Miva will refuse to import it since it looks outdated. But that means if I want to downgrade to an older copy of the module in the event of a major bug or something, Miva won't let me.

    I have the source code of the latest stable version saved separately, so I could just do a fake-bump of that version number and upload that, basically reverting to the previous version.

    Is that the best way to do it?

    Obviously the goal is to release a bug-free version from the start, but since this is a very big change, I want to be prepared with a downgrade plan just in case.
    Looking for work as of March 2024! I've been a web developer for going on 20 years, with most of that time spent on Miva sites.

    #2
    Without manually editing a bunch of tables, simply taking your old source code and bumping the version is the easiest way to go (as you thought.)

    The only caveat is if you created tables that the old/new module doesn't need then you should either code some cleanup in the module upgrade function or manually delete tables and other resources your module no longer needs. If this is on your own dev store then cleanup isn't as important.
    M.A.D.* since 1997

    http://www.scotsscripts.com

    *miva application developers

    Comment


      #3
      If i'm not mistaken (been awhile)..a simplier approach might be to change the name the modules. Something like mw_my_module to mw_my_module_dev1 and leave the version number alone. Miva apparently doesn't care about module names.

      that is, if you don't make direct calls to the module from the SMT layer.
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Thanks Scot - ScotsScripts.com and Bruce - PhosphorMedia!

        For this particular update there are no table changes being made in the DB, so downgrading by faking the version number should work fine

        That's interesting that I can name the module differently.. So you mean `l.module:name` in the `Module_Description` function?
        Looking for work as of March 2024! I've been a web developer for going on 20 years, with most of that time spent on Miva sites.

        Comment


          #5
          I think Bruce meant "code" instead of "name". You can rename a module to anything, but it's the module code that the store uses during module install/upgrade/remove.
          M.A.D.* since 1997

          http://www.scotsscripts.com

          *miva application developers

          Comment


            #6
            got it, thanks again!
            Looking for work as of March 2024! I've been a web developer for going on 20 years, with most of that time spent on Miva sites.

            Comment

            Working...
            X