Package manager updates do not update SMF version in database?

Started by Adrek, February 25, 2013, 12:39:52 PM

Previous topic - Next topic

Adrek

Why updates installed using package manager do not update SMF version in database?

I'm just curious ::)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Arantor

Because there's no code in them to do so, simple as that.

The updates in the package manager are literally the same as mods. They are built using the same facilities as mods.

They would need to add a couple of lines to the installer to also update the DB, which is difficult to do in a mod package, though the <code> tag run inline would certainly do the trick (except for manual installation users)

MrPhil

If we keep the current numbering system, the SMF version certainly should be updated as part of any upgrade, regardless of whether the database is changed or not. (I assume you're talking about the smfVersion entry in the settings.) It's very frequent that someone posts that they have an out of date database (because some error message told them so), when actually the database is fine (yes, the smfVersion is back level, but the database schema itself hasn't changed in eons). Nevertheless, that ominous error message scares a lot of people and should not show up unless the database schema is really not matching the file code.

It would not be difficult to have some place in the files that states the specific database version needed (and smfVersion could then even be decoupled from the SMF version, if desired). Say, $requiredSmfDatabase = '2.0.0'; and smfVersion is left at 2.0.0 until some new SMF version that requires a DB change. During an error message, if smfVersion != $requiredSmfDatabase, you get the scary "database may need an upgrade". Otherwise, that part of the error message is omitted. People are no longer unnecessarily upset and concerned that they may need to update their database. Much wasted energy and commotion is avoided.

I'm not holding my breath.

Arantor

QuoteI assume you're talking about the smfVersion entry in the settings

Yes.

Quoteyes, the smfVersion is back level, but the database schema itself hasn't changed in eons

Not quite.

SMF 1.1.x had a schema change in 1.1.9 (2009), SMF 2.0 had a schema change in 2.0 RC4 (2010).

The patch upgrade for 1.1.9 did actually contain code to update the relevant variable. Not sure about the main upgrader code.

QuotePeople are no longer unnecessarily upset and concerned that they may need to update their database

You could actually just drop that check entirely and it would improve things immensely (since the error itself should indicate if a schema change was actually needed)

Advertisement: