function ga_stats_schema in Google Analytics Statistics 7
Same name and namespace in other branches
- 7.2 ga_stats.install \ga_stats_schema()
- 7.x ga_stats.install \ga_stats_schema()
Implements hook_schema().
File
- ./
ga_stats.install, line 72
Code
function ga_stats_schema() {
$schema = array();
$schema['ga_stats_count'] = array(
'description' => 'Stores counts for different metics.',
'fields' => array(
'nid' => array(
'type' => 'int',
'not null' => FALSE,
'description' => 'nid of related node',
),
'url' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'URL of page',
),
'metric' => array(
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
'description' => 'name of tracked metric',
),
'timeframe' => array(
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
'description' => 'timeframe delimiter of metric',
),
'count' => array(
'type' => 'int',
'not null' => TRUE,
'description' => 'number of hits recorded for the metric',
),
),
'primary key' => array(
'nid',
),
'indexes' => array(
'ga_stats_metric' => array(
'metric',
),
'ga_stats_timeframe' => array(
'timeframe',
),
'ga_stats_nid' => array(
'nid',
),
'ga_stats_count' => array(
'count',
),
),
);
return $schema;
}