You are here

function og_panels_update_5001 in Organic groups 5

Same name and namespace in other branches
  1. 5.8 og_panels.install \og_panels_update_5001()
  2. 5.3 og_panels.install \og_panels_update_5001()
  3. 5.7 og_panels.install \og_panels_update_5001()
  4. 6 modules/og_panels/og_panels.install \og_panels_update_5001()

File

./og_panels.install, line 35

Code

function og_panels_update_5001() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {og_panels} ADD COLUMN weight int(4) NOT NULL DEFAULT 0");
      break;
    case 'pgsql':
      db_add_column($ret, 'og_panels', 'weight', 'integer', array(
        'not null' => TRUE,
        'default' => 0,
      ));
      break;
  }
  return $ret ? $ret : array();
}