You are here

function term_permissions_schema in Taxonomy Term Permissions 7

Same name and namespace in other branches
  1. 6 term_permissions.install \term_permissions_schema()

Implements hook_schema().

File

./term_permissions.install, line 11
Install, update and uninstall functions for the term_permissions module.

Code

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;
}