You are here

function custom_pagers_update_1 in Custom Pagers 5

Same name and namespace in other branches
  1. 6 custom_pagers.install \custom_pagers_update_1()

File

./custom_pagers.install, line 42

Code

function custom_pagers_update_1() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {custom_pager} ADD list_php text");
      $ret[] = update_sql("ALTER TABLE {custom_pager} ADD visibility_php text");
      break;
    case 'pgsql':
      db_add_column($ret, 'custom_pager', 'list_php', 'text', array(
        'default' => '',
      ));
      db_add_column($ret, 'custom_pager', 'visibility_php', 'text', array(
        'default' => '',
      ));
      break;
  }
  return $ret;
}