You are here

function og_update_10 in Organic groups 5.2

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

File

./og.install, line 275

Code

function og_update_10() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {og_uid} ADD created int(11) NULL DEFAULT 0");
      $ret[] = update_sql("ALTER TABLE {og_uid} ADD changed int(11) NULL DEFAULT 0");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {og_uid} ADD COLUMN created numeric(11) NULL DEFAULT 0");
      $ret[] = update_sql("ALTER TABLE {og_uid} ADD COLUMN changed numeric(11) NULL DEFAULT 0");
      break;
  }
  return $ret ? $ret : array();
}