function boost_update_6115 in Boost 6
Update 6115 - Change PK
File
- ./
boost.install, line 1176 - Handles Boost module installation and upgrade tasks.
Code
function boost_update_6115() {
$GLOBALS['_boost_max_execution_time'] = ini_get('max_execution_time');
ini_set('max_execution_time', 10800);
//3 Hours
_boost_install_set_time_limit(0);
$ret = array();
// Edit filename column & set PK
db_drop_primary_key($ret, 'boost_cache');
db_change_field($ret, 'boost_cache', 'filename', 'filename', array(
'description' => 'URL of cached page',
'type' => 'text',
'size' => 'normal',
'not null' => TRUE,
'default' => '',
));
db_add_primary_key($ret, 'boost_cache', array(
'hash',
));
// Edit URL column & set unique key
db_drop_unique_key($ret, 'boost_crawler', 'url');
db_change_field($ret, 'boost_crawler', 'url', 'url', array(
'description' => 'URL of cached page',
'type' => 'text',
'size' => 'normal',
'not null' => TRUE,
'default' => '',
));
db_add_unique_key($ret, 'boost_crawler', 'hash', array(
'hash',
));
_boost_install_set_time_limit(0);
ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
return $ret;
}