function block_access_update_6001 in Block Access 6.2
Same name and namespace in other branches
- 6 block_access.install \block_access_update_6001()
File
- ./
block_access.install, line 67 - block_access module installation and upgrade code.
Code
function block_access_update_6001() {
$ret = array();
drupal_install_schema('block_access');
$ret[] = update_sql("INSERT INTO {block_access_roles} SELECT * FROM {blocks_roles} WHERE permission != ''");
$ret[] = update_sql("DELETE FROM {blocks_roles} WHERE permission != ''");
db_drop_primary_key($ret, 'blocks_roles');
db_drop_field($ret, 'blocks_roles', 'permission');
db_add_primary_key($ret, 'blocks_roles', array(
'module',
'delta',
'rid',
));
return $ret;
}