Jump to content

Possible Addition of an OnVersionChange() method to Module class


netcarver
 Share

Recommended Posts

Would it be useful to any other module authors if there were some way of notifying a module that it had just been updated?

So, when you do a module update in the core, to have an OnVersionChange($old, $new) method (or something else that hits the mark) in the base class that the core then calls. Modules could override the implementation to provide whatever udpate to their schemas they need? I know that some of Teppo's modules track their version numbers so they can detect changes and update their table schemas as needed but it seems to me that this would make a pretty good core-feature candidate.

I've just had a most welcome pull request on one of my older modules but it will require me to manually add my own module version checking/schema update mechanism to handle things nicely (probably just a copy of the way Teppo does it) but I'd rather not do that if we can get something into the core that does it well.

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...