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.
Updating from 1.9 to 2.5 results in following from update.php
metatags_quick module
7004 - Change primary key to id field and add unique index on path and lang.
The following updates returned messages
metatags_quick module
Update #7004
Failed: DatabaseSchemaObjectExistsException: Cannot add unique key lang_path to table metatags_quick_path_based: unique key already exists. in DatabaseSchema_mysql->addUniqueKey() (line 417 of /home/sussexho/public_html/includes/database/mysql/schema.inc).
Comment | File | Size | Author |
---|---|---|---|
#2 | 1705076.patch | 599 bytes | valthebald |
Comments
Comment #1
Marshall_Kennard CreditAttribution: Marshall_Kennard commentedThe installer is trying to create an index that has already been created when the table was built. Drop the lang_path index on the metatags_quick_path_based table and re-run update.php. This will bring the schema up-to-date (7004).
Comment #2
valthebald#1: thanks for the tip.
Attached patch checks if the index exists, and adds it only if necessary
Comment #3
valthebald