function user_update_7006

Add module data to {role_permission}.

Related topics

File

modules/user/user.install, line 610

Code

function user_update_7006(&$sandbox) {
  $module_field = array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
    'description' => "The module declaring the permission.",
  );
  // Check that the field hasn't been updated in an aborted run of this
  // update.
  if (!db_field_exists('role_permission', 'module')) {
    // Add a new field for the fid.
    db_add_field('role_permission', 'module', $module_field);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.