| 1 |
<?php
|
| 2 |
// $Id: role_activity.install,v 1.2 2009/01/27 02:33:07 kbahey Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_schema().
|
| 6 |
*/
|
| 7 |
function role_activity_schema() {
|
| 8 |
$schema['role_activity'] = array(
|
| 9 |
'description' => 'Stores activity for certain roles',
|
| 10 |
|
| 11 |
'fields' => array(
|
| 12 |
'raid' => array('type' => 'serial', 'not null' => TRUE, ),
|
| 13 |
'uid' => array('type' => 'int', 'not null' => TRUE, ),
|
| 14 |
'timestamp' => array('type' => 'int', 'not null' => TRUE, ),
|
| 15 |
'type' => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, ),
|
| 16 |
'referer' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
|
| 17 |
'ip' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
|
| 18 |
'action' => array('type' => 'varchar', 'length' => 256, 'not null' => TRUE, ),
|
| 19 |
'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, ),
|
| 20 |
'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, ),
|
| 21 |
'message' => array('type' => 'text', 'size' => 'big', 'not null' => TRUE, ),
|
| 22 |
),
|
| 23 |
|
| 24 |
'primary key' => array('raid'),
|
| 25 |
|
| 26 |
'indexes' => array(
|
| 27 |
'uid' => array('uid'),
|
| 28 |
'timestamp' => array('timestamp'),
|
| 29 |
'type' => array('type'),
|
| 30 |
),
|
| 31 |
);
|
| 32 |
|
| 33 |
return $schema;
|
| 34 |
}
|
| 35 |
|
| 36 |
/**
|
| 37 |
* Implementation of hook_install().
|
| 38 |
*/
|
| 39 |
function role_activity_install() {
|
| 40 |
drupal_install_schema('role_activity');
|
| 41 |
}
|
| 42 |
|
| 43 |
/**
|
| 44 |
* Implementation of hook_uninstall().
|
| 45 |
*/
|
| 46 |
function role_activity_uninstall() {
|
| 47 |
drupal_uninstall_schema('role_activity');
|
| 48 |
}
|