You are here

function yandex_metrics_schema in Yandex.Metrics 6.2

Same name and namespace in other branches
  1. 6 yandex_metrics.install \yandex_metrics_schema()
  2. 7 yandex_metrics.install \yandex_metrics_schema()

Implementation of hook_schema().

File

./yandex_metrics.install, line 80
Install, uninstall and update the module.

Code

function yandex_metrics_schema() {
  $schema['yandex_metrics_popular_content'] = array(
    'description' => 'Stores the popular content.',
    'fields' => array(
      'url' => array(
        'description' => 'The url obtained from Yandex.metrika.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'page_title' => array(
        'description' => 'The page title of the url.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'page_views' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Page views of this url.',
      ),
    ),
    'unique keys' => array(
      'url' => array(
        'url',
      ),
    ),
  );
  return $schema;
}