You are here

function block_access_schema in Block Access 6

Same name and namespace in other branches
  1. 6.2 block_access.install \block_access_schema()
  2. 7 block_access.install \block_access_schema()

Implementation of hook_schema().

File

./block_access.install, line 11
block_access module installation and upgrade code.

Code

function block_access_schema() {
  $schema['block_access_roles'] = array(
    'description' => 'Extension of blocks_roles',
    'fields' => array(
      'module' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => "The block's origin module, from {blocks}.module.",
      ),
      'delta' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => FALSE,
        'description' => "The block's unique delta within module, from {blocks}.delta.",
      ),
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => "The user's role ID from {users_roles}.rid.",
      ),
      'permission' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => 'The permission being granted',
      ),
    ),
    'primary key' => array(
      'module',
      'delta',
      'rid',
      'permission',
    ),
    'indexes' => array(
      'rid' => array(
        'rid',
      ),
    ),
  );
  return $schema;
}