function forum_access_schema in Forum Access 7
Same name and namespace in other branches
- 8 forum_access.install \forum_access_schema()
- 6 forum_access.install \forum_access_schema()
Implements hook_schema().
File
- ./
forum_access.install, line 47 - Install, update and uninstall functions for the forum_access module.
Code
function forum_access_schema() {
$schema['forum_access'] = array(
'description' => 'The Forum Access control table.',
'fields' => array(
'tid' => array(
'description' => 'The {taxonomy_term_data}.tid to which this {forum_access} entry applies.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'rid' => array(
'description' => 'The {role}.rid to which this {forum_access} entry applies.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'grant_view' => array(
'description' => 'Whether to grant "view" permission.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'grant_update' => array(
'description' => 'Whether to grant "update" permission.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'grant_delete' => array(
'description' => 'Whether to grant "delete" permission.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'grant_create' => array(
'description' => 'Whether to grant "create" permission.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'priority' => array(
'description' => 'The priority of this grant.',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'tid',
'rid',
),
'indexes' => array(
'rid' => array(
'rid',
),
),
'foreign keys' => array(
'tid' => array(
'taxonomy_term_data' => 'tid',
),
'rid' => array(
'role' => 'rid',
),
),
);
return $schema;
}