You are here

function term_permissions_schema in Taxonomy Term Permissions 6

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

Implementation of hook_schema()

File

./term_permissions.install, line 24

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