Or maybe something else; this is my first upgrade, so bear with me . . .

After running update.php, I got 2 errors:

  • user warning: Incorrect table definition: There can only be one auto column and it must be defined as a key query: ALTER TABLE node DROP PRIMARY KEY in /***/includes/database.mysq.inc on line 121.
  • user warning: Multiple primary key defined query: ALTER TABLE node ADD PRIMARY KEY (nid, vid) in /***/includes/database.mysq.inc on line 121.

Both of these seemed to be under:

Update #180

  • Failed: ALTER TABLE {node} DROP PRIMARY KEY
  • Failed: ALTER TABLE {node} ADD PRIMARY KEY (nid, vid)
  • ALTER TABLE {node} ADD UNIQUE (vid)
  • ALTER TABLE {node} ADD INDEX (nid)
  • ALTER TABLE {node_counter} CHANGE nid nid INT(10) NOT NULL DEFAULT '0'

I'm doing this on a test site, which I hope to just move my dns to (the site is fairly static). There is a vid field in the node table (that isn't in the old site), and it has the same values as the nid, but it is not set to auto_increment (other structure info seems the same in phpMyAdmin).

Everything seems to be working reasonably well, however. I have most of the added modules back in, and the site is functioning well--I just want to make sure something awfult won't rear its head down the road. Thanks!

Comments

nrasmus’s picture

Edit:

I found a dupe of this here: http://drupal.org/node/66988. I did as starkos did, running the two failed queries manually, and they ran fine. My remaining question, then:

Should I also re-run the successful queries in this update?

Thanks for any help you can offer!

rajaiskandarshah’s picture

did you have the aggregator2 module ? read somewhere that the sql error messages are due to aggregator2. i am trying to find the article. apparently, you need to drop the index first before you can upgrade.

i am also trying to update from 4.6.x to 4.7.4.

did the first round using fantastico - arrgghh.... does not work right, as fantastico will delete the previous drupal files and directories, then installed the new drupal files and directories and updated the database - which means that all my previous modules and themes were gone !! installing the modules back still does not get me back to the previous state.

so now i am back to restoring the whole previous file and database backups.

Raja Iskandar Shah
Consulting for Malaysian Business
www.norazilaco.biz