You are here

function og_update_7 in Organic groups 5.2

Same name and namespace in other branches
  1. 5.8 og.install \og_update_7()
  2. 5 og.install \og_update_7()
  3. 5.3 og.install \og_update_7()
  4. 5.7 og.install \og_update_7()

File

./og.install, line 240

Code

function og_update_7() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {node_access} CHANGE grant_view grant_view int(11) unsigned NOT NULL default '0'");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {node_access} " . "ALTER COLUMN grant_view TYPE numeric(11), " . "ALTER COLUMN grant_view SET NOT NULL, " . "ALTER COLUMN grant_view SET DEFAULT 0;");
      break;
  }
  return $ret ? $ret : array();
}