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

ankur’s picture

When 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.

bdragon’s picture

Status: Active » Closed (fixed)

oid is dead. 4.7 is dead. I hope everyone's upgraded past that point by now.