Closed (fixed)
Project:
Location
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2007 at 15:45 UTC
Updated:
6 Mar 2008 at 20:52 UTC
In the update of I modulate in the process #3, apparently not this the field or they forgot to erase the field “oid”
error:
user warning: Unknown column 'oid' in 'location' query: ALTER TABLE location CHANGE oid eid int unsigned NOT NULL default '0' in /var/www/html/includes/database.mysql.inc on line 121.
Code:
function location_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {location} CHANGE oid eid int unsigned NOT NULL default '0'");
break;
}
I think that I would have of being:
function location_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {location} CHANGE eid int unsigned NOT NULL default '0'");
break;
}
Comments
Comment #1
ankur commentedWhen using CHANGE on columns in SQL, the new column name needs to immediately follow the new column name. It looks to me that you might have already run this update, since it's complaining that the 'oid' column doesn't exist anymore, which would've been a result of update #3.
Comment #2
bdragon commentedoid is dead. 4.7 is dead. I hope everyone's upgraded past that point by now.