You are here

function menu_per_role_schema in Menu Per Role 7

Same name and namespace in other branches
  1. 6 menu_per_role.install \menu_per_role_schema()

Implements hook_schema().

File

./menu_per_role.install, line 11
Install, update and uninstall functions for the menu_per_role module.

Code

function menu_per_role_schema() {
  $schema['menu_per_role'] = array(
    'fields' => array(
      'mlid' => array(
        'description' => 'The menu identifier.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'rids' => array(
        'description' => 'The role identifiers separated by commas. Show to those roles.',
        'type' => 'text',
        'not null' => TRUE,
      ),
      'hrids' => array(
        'description' => 'The role identifiers separated by commas. Hide from those roles.',
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'mlid',
    ),
    'foreign keys' => array(
      'mlid' => array(
        'table' => 'menu',
        'columns' => array(
          'mlid' => 'mlid',
        ),
      ),
    ),
  );
  return $schema;
}