og_role_watchdog.install in Role Watchdog 6
Same filename and directory in other branches
Install file for Role watchdog.
File
modules/og_role_watchdog/og_role_watchdog.installView source
<?php
/**
* @file
* Install file for Role watchdog.
*/
/**
* Implementation of hook_schema().
*/
function og_role_watchdog_schema() {
$schema['og_role_watchdog'] = array(
'description' => t('Log of group information associated with each role change.'),
'fields' => array(
'hid' => array(
'description' => t('ID of the history entry.'),
'type' => 'int',
'unsigned' => 1,
'not null' => TRUE,
'default' => 0,
),
'gid' => array(
'description' => t('Group that Role ID changed in, if og_user_roles made the change.'),
'type' => 'int',
'unsigned' => 1,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'hid' => array(
'hid',
),
),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function og_role_watchdog_install() {
drupal_install_schema('og_role_watchdog');
// Set our weight to be lower than role_watchdog so that our hook_user is called first.
db_query("UPDATE {system} SET weight = -1 WHERE type = 'module' AND name = 'og_role_watchdog'");
}
/**
* Implementation of hook_uninstall().
*/
function og_role_watchdog_uninstall() {
drupal_uninstall_schema('og_role_watchdog');
}
Functions
Name | Description |
---|---|
og_role_watchdog_install | Implementation of hook_install(). |
og_role_watchdog_schema | Implementation of hook_schema(). |
og_role_watchdog_uninstall | Implementation of hook_uninstall(). |