function user_update_7007

7.x user.install user_update_7007()

Add a weight column to user roles.

Related topics

File

drupal-7.x/modules/user/user.install, line 616
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'));
}