4

I updated a module, ran update.php, made some edits and backed up it's table for migration. And then HDD on server failed. Admins restored it from nightly backup, and from my backup as well (both was in proper backup directory). So I had new table structure and data, but old files. I uploaded module's files and it all works, but it shows I have one pending update. Update that is bound to fail as columns it's supposed to rename are already renamed.

Is there an easy way to tell Drupal manually "it's done already, don't try to run this update"?

1 Answer 1

9

I've never done this before so I'm not sure if this will work but I assume you can manually update the schema_version column in the {system} table to the highest hook_update_N number. For example if there's mymodule_update_7101 in the .install file of mymodule then update the schema_version column of the system table for mymodule to 7101.

I don't get it though, how come if you have updated fields in the module table of same database, how is it that the system table is older?

3
  • I had nightly backup of everything and fresh manual backup of just one table. After crash these backups was restored, in that order. I should have removed manual backup from automatic restore directory (it was made with another purpose, after all) or make a full snapshot after my edits, my fault I haven't.
    – Mołot
    Commented Jun 11, 2013 at 8:41
  • 1
    Ah I see that's a tricky situation, but you've accepted my answer I suppose the method I suggested has worked out for you.
    – Beebee
    Commented Jun 11, 2013 at 8:43
  • Indeed. At least it does not complain for now. It was so simple I'm a bit ashamed I didn't think about that earlier.
    – Mołot
    Commented Jun 11, 2013 at 8:44

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.