I've created a custom module for my Drupal 7 website, under sites/all/modules/custom/tm_general which has the following updates in the tm_general.install (please see image attached).

The site is being installed from scratch, meaning the DB is empty when installing. After installation, I have enabled the custom module through the UI.

The problem I'm encountering is that when visiting mysite.local/update.php the updates won't show up. It says No pending updates.

What am I missing?

Thanks a lot in advanced!

enter image description here

2 Answers 2


If you are freshly enabling the module, all updates will be applied by default. If you are upgrading that module from previous module to new one..then you will see those upgrade messages on /update.php

  • It makes sense, however the updates haven't been applied when enabling the module. I have tried to move the code inside the hook_enable to see if that made a difference but it didn't :(
    – Teknotica
    May 9, 2017 at 12:03
  • 3
    however the updates haven't been applied when enabling the module that's correct - updates are only for updating modules. For new installs, hook_enable and hook_install should be used as appropriate to make sure the database is in the same state as it would be for old versions of the module that had been updated
    – Clive
    May 9, 2017 at 12:54
  • Thank you @Clive - using the hook_unable solved the problem for the newly added module in the site
    – Teknotica
    May 9, 2017 at 13:11

The 'system' table in your db contains the current "version" of modules, so I would check there first.

Also, if these modules are dependencies, you can just include them in your module.info (writing module .info files in Drupal 7) by simply adding

dependencies[] = devel
dependencies[] = views

and so on.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.