Update #7014
Failed: DatabaseSchemaObjectExistsException: Cannot add index language to table node: index already exists...

In another site on the same server (much less complex) it succeeded.
In another site on a different server (complex) it succeeded.

Comments

yktdan’s picture

Issue summary: View changes
yktdan’s picture

Issue summary: View changes
XerraX’s picture

In phpMyAdmin:

ALTER TABLE node DROP INDEX language

then update.php

yktdan’s picture

Don't do this. Site now runs impossibly slowly without an index and the update process did not rebuild the index. Restored successfully but still wants to do update which will fail. But I shouldn't have to go into phpmyadmin to fix things - the code has a bug in not coping with an error of this sort.

jaydee1818’s picture

I received this error when trying to update:

Downloading updates failed:

Extracted file temporary://update-extraction-6d9c8f91/entity/LICENSE.txt does not have the correct file size '17408' (18092 expected). Archive may be corrupted.

1mas1com’s picture

Same problem!

Jorgas’s picture

I had the same problem. So I restored my site to previous version and updated it again. This time the site was updated successfully.

yktdan’s picture

Not all of us of can restore to previous version. We run ecommerce and any backup is out of date within an hour or less. If you write an update that modifies the data structure, it is up to the coder to check for all possible failures and leave the database as it was before the failure, so the old code can be put back on, while you figure out what is wrong.

jaydee1818’s picture

I just manually deleted the entity module and replaced it with the new one and that did the trick.

fago’s picture

Status: Active » Closed (works as designed)

Update #7014 is not part of this modue.

Sarasvati’s picture

As Jorgas, I just restored my site to previous version and updated it again: not yet solved #7014 error.

hswong3i’s picture

Project: Entity API » Drupal core
Version: 7.x-1.3 » 7.x-dev
Component: Code - misc » node system
Status: Closed (works as designed) » Active

So at least move it back to correct project ;-)

hswong3i’s picture

Re #4: I think #3 is totally correct, the case "impossibly slowly" is because of your site is still "live" during upgrade, which should be avoid.

I would like to recommend in follow procedure with drush:

/etc/init.d/apache2 stop
/etc/init.d/mysql restart
drush -y sqlq "ALTER TABLE node DROP INDEX language;"
drush -y updb
drush -y cc all
drush -y cron
/etc/init.d/mysql restart
/etc/init.d/apache2 start
hswong3i’s picture

Category: Bug report » Support request
yktdan’s picture

The original post about:
node module

Update #7014
Failed: DatabaseSchemaObjectExistsException: Cannot add index language to table node: index already exists. in DatabaseSchema_mysql->addIndex() (line 437 of /home/yktdan/public_html/fofdr.org/includes/database/mysql/schema.inc).

was against the wrong module. It should have been against the node module.

I believe I noticed it because all I was doing was updating entity when in reality is was a left over from some previous update.

My mistake - off to look at node's issues.

yktdan’s picture

Here is a tested fix: (tested on a system that had an index and trying to re-add it fails)
/**
* Add an index on {node}.language.
*/
function node_update_7014() {
db_drop_index('node', 'language');
db_add_index('node', 'language', array('language'));
}

where the db_drop_index line has been added.

dcam’s picture

Status: Active » Closed (fixed)

It looks like everyone who had this issue fixed it one way or another.