ga_push_browser.install in GA Push 7
Install, update, and uninstall functions for the ga_push_browser module.
File
modules/browser/ga_push_browser.installView source
<?php
/**
* @file
* Install, update, and uninstall functions for the ga_push_browser module.
*/
/**
* Implements hook_schema().
*/
function ga_push_browser_schema() {
$schema = array();
$schema['ga_push_browser_event'] = array(
'description' => 'GA push browser event list.',
'fields' => array(
'id' => array(
'description' => 'GA Push Browser Event identifier.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'name' => array(
'description' => 'GA Push Browser Event name',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'status' => array(
'description' => 'Status',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'selector' => array(
'description' => 'jQuery selector',
'type' => 'varchar',
'length' => 1024,
'not null' => TRUE,
'default' => '',
),
'bind' => array(
'description' => 'Bind',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'ga_category' => array(
'description' => 'GA Category',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'ga_action' => array(
'description' => 'GA Action',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'ga_label' => array(
'description' => 'GA Label',
'type' => 'varchar',
'length' => 255,
'default' => '',
),
'ga_value' => array(
'description' => 'GA Value',
'type' => 'int',
'default' => 0,
),
),
'primary key' => array(
'id',
),
);
return $schema;
}
/**
* Install ga_push_browser_schema().
*/
function ga_push_browser_update_7001() {
if (!db_table_exists('ga_push_browser_event')) {
drupal_install_schema('ga_push_browser');
}
}
Functions
Name | Description |
---|---|
ga_push_browser_schema | Implements hook_schema(). |
ga_push_browser_update_7001 | Install ga_push_browser_schema(). |