Closed (won't fix)
Project:
Drupal core
Version:
x.y.z
Component:
update system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2006 at 04:27 UTC
Updated:
8 Sep 2006 at 20:16 UTC
Downloaded drupal-cvs today. installed and ran update.php on a 4.5 site. Updates 111-179 were fine.
Update 180 reports
Can't DROP 'vid'. Check that column/key exists query: ALTER TABLE node DROP INDEX vid in
The server is running Apache 2.0.51, php 4.3.11, and mysql 3.23.58
function system_update_180() {
$ret = array();
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {node} DROP PRIMARY KEY");
$ret[] = update_sql("ALTER TABLE {node} ADD PRIMARY KEY (nid, vid)");
$ret[] = update_sql("ALTER TABLE {node} DROP INDEX vid");
$ret[] = update_sql("ALTER TABLE {node} ADD UNIQUE (vid)");
$ret[] = update_sql("ALTER TABLE {node} ADD INDEX (nid)");
$ret[] = update_sql("ALTER TABLE {node_counter} CHANGE nid nid INT(10) NOT NULL DEFAULT '0'");
}
else { // pgsql
// Insert queries here.
}
return $ret;
}
is there a recommended workaround?
Comments
Comment #1
rjleigh commentedsee http://drupal.org/node/65456
Comment #2
chx commentedYou should upgrade to 4.6 first.