permissions_by_term.install in Permissions by Term 7
Same filename and directory in other branches
Install, update and uninstall functions for the permissions_by_term module.
File
permissions_by_term.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the permissions_by_term module.
*/
/**
* Implements hook_schema().
*/
function permissions_by_term_schema() {
$schema = array();
// Specifications for tabe 'permissions_by_term_user'
$schema['permissions_by_term_user'] = array(
'description' => "Stores the tid's to which a user has permission by his uid.",
'fields' => array(
'tid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'tid',
'uid',
),
);
// Specifications for tabe 'permissions_by_term_role'
$schema['permissions_by_term_role'] = array(
'description' => "Stores the tid's to which user's are allowed to by rid.",
'fields' => array(
'tid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'rid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'tid',
'rid',
),
);
return $schema;
}
Functions
Name | Description |
---|---|
permissions_by_term_schema | Implements hook_schema(). |