I tried upgrading a copy of site on my local pc from 5.7 to 6.8

I got these errors on running update.php

* user warning: Column 'vid' cannot be null query: UPDATE drupal_term_node t SET vid = (SELECT vid FROM drupal_node n WHERE t.nid = n.nid) in C:\wamp\www\yeawo\modules\system\system.install on line 1150.
* user warning: Duplicate entry '5433-2182-' for key 'PRIMARY' query: ALTER TABLE drupal_poll_votes ADD PRIMARY KEY (nid, uid, hostname) in C:\wamp\www\yeawo\includes\database.mysql-common.inc on line 374.
* user warning: Duplicate entry '1-0' for key 'PRIMARY' query: ALTER TABLE drupal_term_node ADD PRIMARY KEY (tid, vid) in C:\wamp\www\yeawo\includes\database.mysql-common.inc on line 374.

and further

Update #6043

* ALTER TABLE {flood} ADD INDEX allow (event, hostname, timestamp)
* ALTER TABLE {history} ADD INDEX nid (nid)
* ALTER TABLE {blocks} CHANGE theme `theme` VARCHAR(64) NOT NULL DEFAULT '', ADD UNIQUE KEY tmd (theme, module, delta), ADD INDEX list (theme, status, region, weight, module)
* ALTER TABLE {blocks_roles} ADD INDEX rid (rid)
* ALTER TABLE {filters} DROP INDEX weight
* ALTER TABLE {filters} ADD UNIQUE KEY fmd (format, module, delta)
* ALTER TABLE {filters} ADD INDEX list (format, weight, module, delta)
* ALTER TABLE {node} DROP INDEX status
* ALTER TABLE {node} DROP KEY nid_vid
* ALTER TABLE {users} ADD INDEX mail (mail)
* ALTER TABLE {users_roles} ADD INDEX rid (rid)
* ALTER TABLE {aggregator_category_feed} DROP PRIMARY KEY
* ALTER TABLE {aggregator_category_feed} ADD PRIMARY KEY (cid, fid)
* ALTER TABLE {aggregator_category_feed} ADD INDEX fid (fid)
* ALTER TABLE {aggregator_category_item} DROP PRIMARY KEY
* ALTER TABLE {aggregator_category_item} ADD PRIMARY KEY (cid, iid)
* ALTER TABLE {aggregator_category_item} ADD INDEX iid (iid)
* ALTER TABLE {contact} ADD INDEX list (weight, category)
* ALTER TABLE {poll_votes} DROP INDEX nid
* Failed: ALTER TABLE {poll_votes} ADD PRIMARY KEY (nid, uid, hostname)
* ALTER TABLE {term_data} DROP INDEX vid
* ALTER TABLE {term_data} ADD INDEX vid_name (vid, name)
* ALTER TABLE {term_data} ADD INDEX taxonomy_tree (vid, weight, name)
* ALTER TABLE {term_node} DROP PRIMARY KEY
* ALTER TABLE {term_node} DROP INDEX tid
* Failed: ALTER TABLE {term_node} ADD PRIMARY KEY (tid, vid)
* ALTER TABLE {term_relation} DROP INDEX tid1
* ALTER TABLE {term_relation} ADD UNIQUE KEY tid1_tid2 (tid1, tid2)
* ALTER TABLE {term_synonym} DROP INDEX name
* ALTER TABLE {term_synonym} ADD INDEX name_tid (name, tid)
* ALTER TABLE {vocabulary} ADD INDEX list (weight, name)
* ALTER TABLE {vocabulary_node_types} DROP PRIMARY KEY
* ALTER TABLE {vocabulary_node_types} ADD PRIMARY KEY (type, vid)
* ALTER TABLE {vocabulary_node_types} ADD INDEX vid (vid)

Whats causing these errors and how do I rectify it ?

Comments

Anthony Pero’s picture

Did you back up when you started? If so, start over, and follow the directions here.

The main thing is to upgrade to the latest version of D5 first, then upgrade to D6.

Anthony Pero
http://limafirstmedia.com
http://anthonypero.com/booking

Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/

grawat’s picture

thanks... I did backup... actually I was trying to upgrade a copy of my site using wamp (so the actual site is still up) ... thanks for the link as well ... don't have the bandwidth to watch the video but will do what u suggested (upgrade to latest version of D5 and then D6).

grawat’s picture

ok so I did u what u said. I upgraded from 5.7 to 5.14 without any errors (there were no changes really). But, when I upgraded from 5.14 to 6.8 again I got the same error as above. Will try and upgrade from 5.14 to 6.1 and see how that goes.

grawat’s picture

so I upgraded from 5.7 to 5.14 and didn't get any errors. but when I upgraded from 5.14 to 6.0 I get the same error. I would really appreciate any help.

grawat’s picture

user warning: Duplicate entry '5433-2182-' for key 'PRIMARY' query: ALTER TABLE drupal_poll_votes ADD PRIMARY KEY (nid, uid, hostname) in C:\wamp\www\yeawo\includes\database.mysql-common.inc on line 374.

This error was fixed easily by deleting the corresponding row. However, for the other two errors I still don't know what to do. I found http://drupal.org/node/296082 and even though I am not using PostgreSQL I tried the patch anyway and that didn't help fix these.

* user warning: Column 'vid' cannot be null query: UPDATE drupal_term_node t SET vid = (SELECT vid FROM drupal_node n WHERE t.nid = n.nid) in C:\wamp\www\yeawo\modules\system\system.install on line 1150.
* user warning: Duplicate entry '1-0' for key 'PRIMARY' query: ALTER TABLE drupal_term_node ADD PRIMARY KEY (tid, vid) in C:\wamp\www\yeawo\includes\database.mysql-common.inc on line 374.

the table drupal_term_node gets created but its empty. Should I manually enter the SQL query from the old database ? (But in D6 vid gets added which isn't there in the D5 version of the table).

grawat’s picture

I checked the error reports and this is the error shown there.

Duplicate entry '1-0' for key 'PRIMARY' query: ALTER TABLE drupal_term_node ADD PRIMARY KEY (tid, vid) in C:\wamp\www\yeawo\includes\database.mysql-common.inc on line 374.

I have clue what that means. tried looking into table drupal_node and drupal_term_node but I didn't know what to look for since there isn't any 039 field in it.

SeanBannister’s picture

sub