function book_access_update_6104 in Book access 6
Implements hook_update_N().
File
- ./
book_access.install, line 201
Code
function book_access_update_6104() {
$ret = array();
db_drop_primary_key($ret, 'book_access_role');
db_change_field($ret, 'book_access_role', 'rid', 'rid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'book_access_role', 'grant_view', 'grant_view', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'book_access_role', 'grant_update', 'grant_update', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'book_access_role', 'grant_delete', 'grant_delete', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_add_primary_key($ret, 'book_access_role', array(
'nid',
'rid',
));
db_drop_primary_key($ret, 'book_access_user');
db_change_field($ret, 'book_access_user', 'uid', 'uid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'book_access_user', 'grant_view', 'grant_view', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'book_access_user', 'grant_update', 'grant_update', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'book_access_user', 'grant_delete', 'grant_delete', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_add_primary_key($ret, 'book_access_user', array(
'nid',
'uid',
));
}