Helo guys, I've a question here which I'm confused about the update.php
In the Administer -> Modules page there's a statement
"It is important that update.php is run every time a module is updated to a newer version."
I'm confuse whether should I:
* Run update.php everytime i replace modules with new version files
* Run update.php on drupal upgrades only
If I need to run update.php, what selections should I choose for the modules? There are many versions there to choose and I don't get it on what to choose (or should not).
Please advice. I'm on Drupal 5.3 now and is using quite a few modules which releases new versions frequently. However what I did now is replace the new files into the old one. Am I doing the correct way? Do I need to run update.php at all?
Comments
Yes
you should run update.php with all module updates - the versions will automatically change if database updates are required for the module updates.
As usual read through the install directions for each module as sometimes (usually with dev versions) you need to choose a specific update, or update sequence.
What if it doesn't
What if it doesn't automatically choose the version? This is because after replacing dev versions/updated versions and running update.php, all the selections it selected by default is No Updates available.
Does that mean I don't even need to update the modules? I've never seen selection boxes auto select the versions before.
And why are there so many versions for some modules? Why can't we just have 1 selection of "Update /No Update" and be gone with the old updates?
Can anyone simplify the upgrade module process? step by step in a mind map or so? I'm blur in this process
...
As I understand it If it doesn't automatically select a version, it doesn't need to update the DB.
The module code is a different component. You need to keep these up to date. Sometimes a new module version will require a DB structure change (e.g. new 'column') or to update table contents. Very many times it doesn't touch the DB, it just updates the code. So once you've put the new module files in place, the module is up to date. The only way to be sure is to run update.php
Best bet is to search the handbooks, and the web for guidance, on module updates.
Ok. So what if that module
Ok. So what if that module version requires a db update, which version should I choose from the dropdown box?
Normally
the default version shown should be selected. If no update is required you'll be shown "No updates available". This only means that the module you have updated doesn't require an update to the database. The modules' code might be the only relevant change.
In the documentation there might be special upgrade considerations which could tell you to choose a particular version. I've come across two modules that were not wholly stable and through trial-and-error it turned out I had to force updates through in a particular sequence. I reiterate: this was only on two modules which were in development. In all other cases I've just accepted the default versions shown.
It's not version numbers
I think you have a confusion.
The optional numbers you see for each module in the update screen after running update.php are NOT version numbers.
These are the sequence numbers of the updates contained in the .install file of the module.
If you look at the .install file of the module, you will see sometimes functions with names module-name_update_X() where X is a sequence number. These are the updates that sometimes should run when upgrading a module.
I think (but not sure) that if in spite of the fact that there are upgrade functions in the .install file, update.php selects to present the "No Updates Available" option, it means it decided that for your specific upgrade from the previous release to the current one, these upgrades are not necessary. Is it correct?
---
http://www.openify.com - Drupal Services in Israel