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).

#2 1705076.patch599 bytesvalthebald


Marshall_Kennard’s picture

The 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).

valthebald’s picture

Version:7.x-2.5» 7.x-2.x-dev
Status:Active» Needs review
new599 bytes

#1: thanks for the tip.
Attached patch checks if the index exists, and adds it only if necessary

valthebald’s picture

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.