You are here

permissions_by_term.install in Permissions by Term 7

Same filename and directory in other branches
  1. 8.2 permissions_by_term.install
  2. 8 permissions_by_term.install

Install, update and uninstall functions for the permissions_by_term module.

File

permissions_by_term.install
View 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

Namesort descending Description
permissions_by_term_schema Implements hook_schema().