function node_limit_userofrole_schema in Node Limit 8
Same name and namespace in other branches
- 7 node_limit_userofrole/node_limit_userofrole.install \node_limit_userofrole_schema()
Implements hook_schema().
File
- old/
node_limit_userofrole/ node_limit_userofrole.install, line 11 - Installation functions for module node_limit_userofrole.
Code
function node_limit_userofrole_schema() {
$schema['node_limit_userofrole'] = array(
'description' => 'The table for applying node limits to each user of a given role',
'fields' => array(
'lid' => array(
'description' => 'The {node_limit}.lid',
'type' => 'int',
'not null' => TRUE,
),
'rid' => array(
'description' => 'The {role}.rid to which this limit applies',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
),
),
// The limit-user combination is unique.
/*
* this means that in the future, we may allow a limit to be applied to more
* than one user. right now, though, its one-user-per-limit.
*/
'primary key' => array(
'lid',
'rid',
),
);
return $schema;
}