You are here

function autoassignrole_update_7101 in Auto Assign Role 7.2

Same name and namespace in other branches
  1. 7 autoassignrole.install \autoassignrole_update_7101()

Add the assign to page table.

1 call to autoassignrole_update_7101()
autoassignrole_update_7103 in ./autoassignrole.install
Migrate db schema from Drupal 6 to 7.

File

./autoassignrole.install, line 144
Installation related functionality for the auto assign role module.

Code

function autoassignrole_update_7101() {
  if (!db_table_exists('autoassignrole_page')) {
    $schema['autoassignrole_page'] = array(
      'description' => 'Stores autoassignrole page information',
      'fields' => array(
        'rid_page_id' => array(
          'type' => 'serial',
          'not null' => TRUE,
          'description' => 'The unique identifier for this role page',
        ),
        'rids' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
          'description' => 'The role IDs for this page',
        ),
        'path' => array(
          'type' => 'text',
          'not null' => TRUE,
          'description' => 'The path for this page',
        ),
        'menu' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
          'description' => 'The default parent menu for this menu item',
        ),
        'title' => array(
          'type' => 'text',
          'not null' => TRUE,
          'description' => 'The description for this page',
        ),
        'display' => array(
          'type' => 'int',
          'not null' => TRUE,
          'description' => 'The display type for this page',
        ),
      ),
      'primary key' => array(
        'rid_page_id',
      ),
    );
    db_create_table('autoassignrole_page', $schema['autoassignrole_page']);
  }
}