function user_update_7007

Add a weight column to user roles.

Related topics

File

modules/user/user.install, line 629

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',
    ));
}

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