Just updated from rc4 to rc 6 and received this error when running update.php:

ALTER TABLE {content_type_product} ADD INDEX nid (nid)
Failed: ALTER TABLE {content_} ADD INDEX nid (nid)

What do I need to do to fix this?

Comments

yched’s picture

Status: Active » Postponed (maintainer needs more info)

Right now I can't figure how this can happen.

Could you attach a sql dump of the {content_node_field } and {content_node_field_instance} tables in your db ?

janne’s picture

(comment removed)

Vially’s picture

I also get the error in the first post. Thank god I made a full backup... :)

yched’s picture

I can't help on this if you guys don't provide the info mentioned in my comment #1.

mrtoner’s picture

Sorry, yched, I resolved this on my own. I probably caused this myself when I neglected to run update.php on one of my installations, then tried to add a CCK field. (This was a multi-site installation of D6; I hadn't run update.php on all of the sites after updating. Stupid, stupid, stupid.)

There was an error, at which time I realized my oversight. When I tried update.php, I got this new error. I went to the db and removed the partially-created field from each table that referenced it, then ran update.php successfully.

The moral of the story? Run update.php on every module update -- and run it for every site in a multi-site installation!

yched’s picture

OK, thks for reporting back.

@Vially: you said you had the same errors ? Are they the exact same errors ? Is this a multisite install, and if so does mrtoner's comment #5 help ?

Vially’s picture

Hi and sorry for my delayed answer. I do not have a multisite installation, and it's a quite regular one, without any custom code or something. Since I had the error I reverted to the previous version (rc4), and haven't tried updating again, as I needed to keep the site live. I will make a full backup asap and try to upgrade again, to try and see what's wrong.

Thank you very much for helping, I will get back asap.

Vially’s picture

I have updated from cck rc4 to rc6, but I can't see anything wrong, there are no errors this time. I have also tried to replicate the error on another site on mine, but with no success either. So either I did something stupid and triggered that error, either there is a bug that comes up only it wants to :).

Until we find out the truth, I am thanking you for your time and wish you a very nice day
Vially.

yched’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

OK, closing, then.
Thx for reporting back.