You are here

function adsense_click_update_1 in Google AdSense integration 6

Same name and namespace in other branches
  1. 5.3 contrib/adsense_click/adsense_click.install \adsense_click_update_1()

Implementation of hook_update_n().

File

contrib/adsense_click/adsense_click.install, line 80
Install file of the adsense_click module.

Code

function adsense_click_update_1() {
  $schema['adsense_clicks'] = array(
    'fields' => array(
      'aid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'disp-width' => '10',
      ),
      'ip' => array(
        'type' => 'varchar',
        'length' => '15',
        'not null' => FALSE,
        'default' => '0',
      ),
      'timestamp' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'disp-width' => '11',
      ),
      'path' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'aid',
    ),
    'indexes' => array(
      'timestamp' => array(
        'timestamp',
      ),
    ),
  );
  $ret = array();
  db_create_table($ret, 'adsense_clicks', $schema['adsense_clicks']);
  return $ret;
}