You are here

function nodeaccess_schema in Nodeaccess 8.2

Same name and namespace in other branches
  1. 8 nodeaccess.install \nodeaccess_schema()
  2. 6.2 nodeaccess.install \nodeaccess_schema()
  3. 6 nodeaccess.install \nodeaccess_schema()
  4. 7 nodeaccess.install \nodeaccess_schema()

Implements hook_schema().

File

./nodeaccess.install, line 59
Install/uninstall functions for Nodeaccess.

Code

function nodeaccess_schema() {
  $schema['nodeaccess'] = [
    'fields' => [
      'nid' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'gid' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'realm' => [
        'type' => 'varchar',
        'length' => 191,
        'not null' => TRUE,
        'default' => '',
      ],
      'grant_view' => [
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'grant_update' => [
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'grant_delete' => [
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'primary key' => [
      'nid',
      'gid',
      'realm',
    ],
  ];
  return $schema;
}