function permissions_by_term_schema in Permissions by Term 8
Same name and namespace in other branches
- 8.2 permissions_by_term.install \permissions_by_term_schema()
- 7 permissions_by_term.install \permissions_by_term_schema()
Implements hook_schema().
File
- ./
permissions_by_term.install, line 14 - Install, update and uninstall functions for the permissions_by_term module.
Code
function permissions_by_term_schema() {
$schema = [];
// Specifications for tabe 'permissions_by_term_user'.
$schema['permissions_by_term_user'] = [
'description' => "Stores the tid's to which a user has permission by his uid.",
'fields' => [
'tid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'uid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'langcode' => [
'type' => 'varchar_ascii',
'length' => 12,
'not null' => TRUE,
'default' => '',
],
],
'primary key' => [],
];
// Specifications for tabe 'permissions_by_term_role'.
$schema['permissions_by_term_role'] = [
'description' => "Stores the tid's to which user's are allowed to by rid.",
'fields' => [
'tid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'rid' => [
'type' => 'varchar',
'length' => 60,
'not null' => TRUE,
],
'langcode' => [
'type' => 'varchar_ascii',
'length' => 12,
'not null' => TRUE,
'default' => '',
],
],
'primary key' => [],
];
return $schema;
}