Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After putting ACL module into modules I tried to run update.php.
It fails on acl_update_2 throwing exception that table {Array} is not found in db.
It seems that it stops on the line 125 of acl.install:
db_drop_index($ret, 'acl', 'acl_id');
I found here in the API that db_drop_index should have two, not three arguments? Is this the reason of failure?
Comments
Comment #1
salvisYou have done something strange on your site.
When you enable a module for the first time, the number of its highest hook_update_NNN() number is entered into your {system} table, and no updates below that NNN will ever run.
Updates below #6000 are for Drupal 5. I don't know how you managed to run update #2.
Comment #2
www.ePortfel.com CreditAttribution: www.ePortfel.com commentedOk, thanks for help, I have schema_version=1 in system table. No idea why.
Will try to figure it out, maybe by correcting schema_version by hand.
Issue to be closed.
Comment #3
www.ePortfel.com CreditAttribution: www.ePortfel.com commentedComment #4
www.ePortfel.com CreditAttribution: www.ePortfel.com commentedOk, as some closing comments I think I got what has happened.
I suppose I installed ACL very long time ago on Drupal 5 version of site, but did not use it and by upgrading to Drupal 6 I did not updated data model. So I had pre-6 model and ACL tries to update to 6 and also to 7, but update to 6 uses old 6th API that does not work on 7.
Workaround: I just copied ACL module onto the site, clicked to uninstall it, which deleted all tables and has set schema version to -1 and then once more I installed ACL - the module has set up fresh DB to version 7. It works.
Comment #5
salvisThank you for following up.
Yes, that explains what you've been seeing.
During the D7 upgrade cycle the consensus was to keep the last two layers of update functions, i.e. D5 and D6, but seeing your experience, this doesn't really make sense, and apparently very few people have ever tried to make use of the D5 update functions.