You are here

function search_by_page_update_6002 in Search by Page 6

Implementation of hook_update_N().

Adds role index to {sbp_path}, and new database table for indexing users.

File

./search_by_page.install, line 246
Install hooks for search_by_page module

Code

function search_by_page_update_6002() {
  $ret = array();
  db_add_index($ret, 'sbp_path', 'role', array(
    'role',
  ));
  $newtable = array(
    'description' => t('Users to be used for search indexing'),
    'fields' => array(
      'rid' => array(
        'description' => t('Role ID'),
        'type' => 'int',
        'size' => 'big',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'uid' => array(
        'description' => t('User ID of user created for this role'),
        'type' => 'int',
        'size' => 'big',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'rid',
    ),
  );
  db_create_table($ret, 'sbp_index_users', $newtable);
  return $ret;
}