Hi all,
I got this error while updating

    * ALTER TABLE {image} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
    * ALTER TABLE {image} CHANGE fid `fid` INT unsigned NOT NULL DEFAULT 0
    * Failed: ALTER TABLE {image} DROP PRIMARY KEY
    * ALTER TABLE {image} ADD PRIMARY KEY (nid, image_size)
    * Failed: ALTER TABLE {image} DROP INDEX image_fid
    * ALTER TABLE {image} ADD INDEX fid (fid)

Note: I have updated this module just after process the update of drupal core from 6.12 to 6.13

Comments

Gord_Mason’s picture

Title: Can't alter table Image while updating » update.php execution problems after updating from 6.x-1.0-alpha4 to 6x-1.0-alpha5.

I have the same problem as above. My site had been in good shape. I noticed a similar post from a while ago where the poster was told to ignore the problem. Is that the same here?

Gord

Gord_Mason’s picture

Title: update.php execution problems after updating from 6.x-1.0-alpha4 to 6x-1.0-alpha5. » update.php execution problems after updating from Image 6.x-1.0-alpha4 to Image 6x-1.0-alpha5.

Sorry, should have made sure the title pointed out that it was the image.module.

cookiesunshinex’s picture

I just received the same errors when upgrading from alpha4 to alpha5.

Gord_Mason’s picture

OK, I've checked my database. All seems well, and the website seems to work well. Are these error messages just a red herring? I'd like to know soon so I can proceed with my website development with more confidence that I am not making changes that will need to be rolled back.

AdrianB’s picture

Take a look at what sun says here: http://drupal.org/node/479964

sun’s picture

Status: Active » Closed (duplicate)

@AdrianB: Thanks! :)

Marking as duplicate of #479964: Can't DROP primary key/index in database update.

libre fan’s picture

Thanks for the link,

Generally speaking;

Should we disable the image module before updating to latest version?

Should we delete all the image dir or simply overwrite?