function forward_schema in Forward 7.2
Same name and namespace in other branches
- 8.3 forward.install \forward_schema()
- 8 forward.install \forward_schema()
- 8.2 forward.install \forward_schema()
- 6 forward.install \forward_schema()
- 7.3 forward.install \forward_schema()
- 7 forward.install \forward_schema()
- 4.x forward.install \forward_schema()
- 4.0.x forward.install \forward_schema()
Implements hook_schema().
File
- ./
forward.install, line 64 - Install, update and uninstall functions for the forward module.
Code
function forward_schema() {
$schema['forward_log'] = array(
'fields' => array(
'path' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => '<front>',
'length' => 255,
),
'type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => 8,
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'hostname' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => 'Hostname of the user who triggered the event.',
),
),
'indexes' => array(
'forward_path' => array(
'path',
),
'forward_uid' => array(
'uid',
),
'forward_hostname' => array(
'hostname',
),
),
);
$schema['forward_statistics'] = array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'last_forward_timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'forward_count' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'clickthrough_count' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'forward_timestamp' => array(
'last_forward_timestamp',
),
),
'primary key' => array(
'nid',
),
);
return $schema;
}