function adsense_click_schema in Google AdSense integration 6
Same name and namespace in other branches
- 7 contrib/adsense_click/adsense_click.install \adsense_click_schema()
Implementation of hook_schema().
File
- contrib/
adsense_click/ adsense_click.install, line 27 - Install file of the adsense_click module.
Code
function adsense_click_schema() {
$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' => FALSE,
'default' => '',
),
'title' => array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
'default' => '',
),
'referrer' => array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
'default' => '',
),
),
'primary key' => array(
'aid',
),
'indexes' => array(
'path' => array(
'path',
),
'timestamp' => array(
'timestamp',
),
),
);
return $schema;
}