| 1 |
<?php
|
| 2 |
// $Id: system_module.install,v 1.2 2008/05/30 15:26:00 litwol Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
*/
|
| 7 |
|
| 8 |
/**
|
| 9 |
* Implementation of hook_install().
|
| 10 |
*/
|
| 11 |
function system_module_install() {
|
| 12 |
drupal_install_schema('system_module');
|
| 13 |
}
|
| 14 |
|
| 15 |
/**
|
| 16 |
* Implementation of hook_uninstall().
|
| 17 |
*/
|
| 18 |
function system_module_uninstall() {
|
| 19 |
drupal_uninstall_schema('system_module');
|
| 20 |
}
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Implementation of hook_schema().
|
| 24 |
*/
|
| 25 |
function system_module_schema() {
|
| 26 |
//this is not used very much yet.
|
| 27 |
//settings are still saved in user.data field.
|
| 28 |
//in next update this module will move away from using user.data and instead use
|
| 29 |
//its own configuration table
|
| 30 |
|
| 31 |
$schema['system_module_users'] = array(
|
| 32 |
'description' => t('Tracks users of this module to enable proper cleanup when module is disabled'),
|
| 33 |
'fields' => array(
|
| 34 |
'uid' => array(
|
| 35 |
'description' => t('User\'s ID'),
|
| 36 |
'type' => 'int',
|
| 37 |
'unsigned' => TRUE,
|
| 38 |
'not null' => TRUE,
|
| 39 |
),
|
| 40 |
'data' => array(
|
| 41 |
'description' => t('Stores serialized array informing of the kind of customizations made by the user'),
|
| 42 |
'type' => 'text',
|
| 43 |
'size' => 'normal',
|
| 44 |
'not null' => FALSE,
|
| 45 |
),
|
| 46 |
),
|
| 47 |
'primary key' => array('uid'),
|
| 48 |
);
|
| 49 |
return $schema;
|
| 50 |
}
|
| 51 |
|
| 52 |
/**
|
| 53 |
* Implementation of hook_disable().
|
| 54 |
*/
|
| 55 |
function system_module_disable() {
|
| 56 |
drupal_rebuild_theme_registry();
|
| 57 |
}
|