You are here

node_limit_role.install in Node Limit 8

Installation functions for module node_limit_role.

File

old/node_limit_role/node_limit_role.install
View source
<?php

/**
 * @file
 * Installation functions for module node_limit_role.
 */

/**
 * Implements hook_schema().
 */
function node_limit_role_schema() {
  $schema['node_limit_role'] = array(
    'description' => 'The table for applying node limits to a role',
    'fields' => array(
      'lid' => array(
        'description' => 'The {node_limit}.lid',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'rid' => array(
        'description' => 'The {role}.rid to which this limit applies',
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
    ),
    // The limit-user combination is unique.

    /*
     * this means that in the future, we may allow a limit to be applied to more
     * than one user.  right now, though, its one-user-per-limit.
     */
    'primary key' => array(
      'lid',
      'rid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
node_limit_role_schema Implements hook_schema().