You are here

popup_onload_statistics.install in Popup On Load 7

Install, update, and uninstall functions for the Popup On Load Statistics module.

File

popup_onload_statistics/popup_onload_statistics.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions
 * for the Popup On Load Statistics module.
 */

/**
 * Implements hook_schema().
 */
function popup_onload_statistics_schema() {
  $schema = [];
  $schema['popup_onload_statistics'] = [
    'description' => 'Primary Key: Identifier for a popup.',
    'fields' => [
      'aid' => [
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary Key: Identifier for an action.',
      ],
      'popup_id' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Popup identifier.',
      ],
      'type' => [
        'type' => 'varchar',
        'not null' => TRUE,
        'length' => 32,
        'description' => 'Action type.',
      ],
      'atime' => [
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Action time.',
      ],
    ],
    'primary key' => [
      'aid',
    ],
    'indexes' => [
      'popup_id' => [
        'popup_id',
      ],
    ],
  ];
  return $schema;
}

Functions

Namesort descending Description
popup_onload_statistics_schema Implements hook_schema().