You are here

function advpoll_update_6 in Advanced Poll 5

Same name and namespace in other branches
  1. 6 advpoll.install \advpoll_update_6()
  2. 6.2 advpoll.install \advpoll_update_6()

Add column for optional question.

File

./advpoll.install, line 257

Code

function advpoll_update_6() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {advpoll} ADD question varchar(255) NOT NULL default ''");
      break;
    case 'pgsql':
      db_add_column($ret, 'advpoll', 'question', 'varchar(255)', array(
        'not null' => TRUE,
        'default' => "''",
      ));
      break;
  }
  return $ret;
}