You are here

function panels_update_5217 in Panels 5.2

Same name and namespace in other branches
  1. 6.3 panels.install \panels_update_5217()

Add the switcher fields to the database

File

./panels.install, line 556

Code

function panels_update_5217() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {panels_page} ADD COLUMN switcher_type varchar(128) AFTER no_blocks");
      $ret[] = update_sql("ALTER TABLE {panels_page} ADD COLUMN switcher_name varchar(128) AFTER no_blocks");
      $ret[] = update_sql("ALTER TABLE {panels_page} ADD COLUMN switcher_options longtext AFTER switcher_type");
      break;
    case 'pgsql':
      db_add_column($ret, 'panels_page', 'switcher_type', 'varchar(128)');
      db_add_column($ret, 'panels_page', 'switcher_name', 'varchar(128)');
      db_add_column($ret, 'panels_page', 'switcher_options', 'text');
  }
  return $ret;
}