You are here

function yandex_metrics_schema in Yandex.Metrics 7

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

Implementation of hook_schema().

1 call to yandex_metrics_schema()
yandex_metrics_update_7100 in ./yandex_metrics.install
Implementation of hook_update_N().

File

./yandex_metrics.install, line 48
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;
}