You are here

function boost_update_6118 in Boost 6

Update 6118 - Change page_arguments column to page_type

File

./boost.install, line 1259
Handles Boost module installation and upgrade tasks.

Code

function boost_update_6118() {
  $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();
  db_drop_index($ret, 'boost_cache', 'page_arguments');
  db_change_field($ret, 'boost_cache', 'page_arguments', 'page_type', array(
    'description' => 'The name of the content type.',
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_index($ret, 'boost_cache', 'page_type', array(
    'page_type',
  ));
  db_drop_index($ret, 'boost_cache_settings', 'page_arguments');
  db_change_field($ret, 'boost_cache_settings', 'page_arguments', 'page_type', array(
    'description' => 'The name of the content type.',
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_index($ret, 'boost_cache_settings', 'page_type', array(
    'page_type',
  ));
  _boost_install_set_time_limit(0);
  ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
  return $ret;
}