You are here

function ad_update_9 in Advertisement 5

Same name and namespace in other branches
  1. 5.2 ad.install \ad_update_9()

Introduce "status" for ad clicks, allowing duplicates to be filtered out.

File

./ad.install, line 442

Code

function ad_update_9() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {ad_clicks} ADD status INT(2) NOT NULL DEFAULT '0' AFTER uid");
      break;
    case 'pgsql':
      db_add_column($ret, 'ad_clicks', 'status', 'int', array(
        'not null' => TRUE,
        'default' => "'0'",
      ));
      break;
  }
  return $ret;
}