You are here

function location_update_3 in Location 7.4

Same name and namespace in other branches
  1. 5.3 location.install \location_update_3()
  2. 5 location.install \location_update_3()
  3. 5 location_upgrade.php \location_update_3()
  4. 6.3 location.install \location_update_3()
  5. 7.5 location.install \location_update_3()
  6. 7.3 location.install \location_update_3()

Legacy update 3. Allow for postgresql support by renaming the oid column, which is a reserved name on postgresql.

File

./location.install, line 390
Installation / uninstallation routines.

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;
  }
  drupal_set_message("The schema for location module has been updated.  The update is such that you may want to re-resave any views you have that may include locations.");
  if (module_exists('views')) {
    views_invalidate_cache();
  }
  return $ret;
}