function og_panels_update_5001 in Organic groups 6
Same name and namespace in other branches
- 5.8 og_panels.install \og_panels_update_5001()
- 5 og_panels.install \og_panels_update_5001()
- 5.3 og_panels.install \og_panels_update_5001()
- 5.7 og_panels.install \og_panels_update_5001()
File
- modules/og_panels/ 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();
}