You are here

function oa_access_schema in Open Atrium Core 7.2

Implements hook_schema().

File

modules/oa_access/oa_access.install, line 10
Install hooks for the Open Atrium Access module.

Code

function oa_access_schema() {
  $schema = array();
  $schema['oa_access'] = array(
    'description' => 'Stores the permissions assigned to Groups or Teams.',
    'fields' => array(
      'nid' => array(
        'description' => 'The primary identifier for a node.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'permission' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => 'A single permission granted to the role identified by rid.',
      ),
      'module' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The module declaring the permission.',
      ),
    ),
    'primary key' => array(
      'nid',
      'permission',
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'permission' => array(
        'permission',
      ),
    ),
    'foreign keys' => array(
      'node' => array(
        'table' => 'node',
        'columns' => array(
          'nid' => 'nid',
        ),
      ),
    ),
  );
  return $schema;
}