You are here

function quotes_update_11 in Quotes 5

Implementation of hook_update_N. Add rand_freq.

File

./quotes.install, line 438
Handles installation and updates for the quotes module.

Code

function quotes_update_11() {
  global $db_type;
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {quotes_blocks} ADD COLUMN rand_freq INTEGER NOT NULL DEFAULT 100");
      break;
    case 'pgsql':
      db_add_column($ret, 'quotes_blocks', 'rand_freq', 'INTEGER', array(
        'not null' => TRUE,
        'default' => '100',
      ));
  }
  return $ret;
}