- πΊπΈUnited States jenlampton
The tip from comment #10 worked for me, but after the upgrade (via the Durpal UI) I still get a failure because update 7301 failed at the rename of the flags table, but succeeded with the rename of the `flag_content` table. Since the whole update needs to be repeated, it's now failing at the rename of the `flag_content` table.
Failed: DatabaseSchemaObjectExistsException: Cannot rename flag_content to flagging: table flagging already exists. in DatabaseSchema_mysql->renameTable() (line 320 of /var/www/html/docroot/includes/database/mysql/schema.inc).
I also made the following changes to `flag_update_7301()`:
function flag_update_7301() { if (db_table_exists('flag_content')) { if (!db_table_exists('flagging')) { db_rename_table('flag_content', 'flagging'); } else { db_drop_table('flag_content'); } } if (db_table_exists('flags')) { db_rename_table('flags', 'flag'); } // A second cache clear appears to be required here... cache_clear_all(); // ...which in fact isn't enough, as the schema cache appears to need explicit // clearing to prevent the next updates failing to get the schema for the new // table names. drupal_get_schema(NULL, TRUE); }