You are here

term_permissions.install in Taxonomy Term Permissions 7

Same filename and directory in other branches
  1. 6 term_permissions.install

Install, update and uninstall functions for the term_permissions module.

File

term_permissions.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the term_permissions module.
 *
 */

/**
 * Implements hook_schema().
 */
function term_permissions_schema() {
  $schema = array();
  $schema['term_permissions_user'] = array(
    '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',
    ),
  );
  $schema['term_permissions_role'] = array(
    '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
term_permissions_schema Implements hook_schema().