You are here

function user_update_7007 in Drupal 7

Add a weight column to user roles.

Related topics

File

modules/user/user.install, line 621
Install, update and uninstall functions for the user module.

Code

function user_update_7007() {
  db_add_field('role', 'weight', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_index('role', 'name_weight', array(
    'name',
    'weight',
  ));
}