I need to add some tables to the database in a new module version. I created a hook_update function:

function bundles_update_7000()

But for some reason my module is missing in the updates list in the admin interface. When I run:

drush pm-update bundles

it writes: "No code updates available."

What could be the issue?

  • Have you done drush cc all to make extra sure that Drupal knows that new function has popped up? – Weston Wedding Aug 5 '15 at 20:23
  • @WestonWedding I ran it, but "drush pm-update bundles" returns the same. – user4035 Aug 5 '15 at 20:26
  • And it's in bundles.install? – Weston Wedding Aug 5 '15 at 20:28
  • @WestonWedding yes. Almost identical code in another module worked. – user4035 Aug 5 '15 at 20:29
  • 1
    If you can run a quick SQL query, what is the result of SELECT name, schema_version FROM `system` WHERE name = 'bundles' ? Maybe it already ran. – Weston Wedding Aug 5 '15 at 20:33

You need to run drush updb, not drush pm-update. And you don't specify the module name. So just:

drush updb
  • Thank you, this worked after changing the function name and running your command. – user4035 Aug 5 '15 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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