function acl_update_6000 in ACL 6
Same name and namespace in other branches
- 7 acl.install \acl_update_6000()
Change acl_id to auto-increment.
File
- ./
acl.install, line 180 - Install, update and uninstall functions for the acl module.
Code
function acl_update_6000() {
$ret = array();
db_change_field($ret, 'acl', 'acl_id', 'acl_id', array(
'type' => 'serial',
'not null' => TRUE,
));
// (Dropping and recreating the primary key on an auto_increment column would cause a MySQL failure.)
db_change_field($ret, 'acl', 'module', 'module', array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
));
db_change_field($ret, 'acl', 'name', 'name', array(
'type' => 'varchar',
'length' => 255,
));
db_add_index($ret, 'acl_node', 'nid', array(
'nid',
));
return $ret;
}