You are here

function search_by_page_paths_update_6001 in Search by Page 8

Implements hook_update_N().

Removes uname field, adds role field.

File

search_by_page_paths/search_by_page_paths.install, line 122
Install hooks for search_by_page_paths module

Code

function search_by_page_paths_update_6001() {
  \Drupal::database()
    ->schema()
    ->dropField('sbpp_path', 'uname');
  \Drupal::database()
    ->schema()
    ->addField('sbpp_path', 'role', array(
    'description' => 'Role ID used to index this path',
    'type' => 'int',
    'size' => 'big',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => AccountInterface::ANONYMOUS_ROLE,
  ));
}