You are here

function boost_update_6104 in Boost 6

Update 6104 - Add new column to tables Add in mime_type column

File

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

Code

function boost_update_6104() {
  $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();

  // Add in extension column
  db_add_field($ret, 'boost_cache', 'extension', array(
    'description' => 'File Extension/Mime content type of this page.',
    'type' => 'varchar',
    'length' => 8,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_field($ret, 'boost_cache_settings', 'extension', array(
    'description' => 'File Extension/Mime content type of this page.',
    'type' => 'varchar',
    'length' => 8,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_index($ret, 'boost_cache', 'extension', array(
    'extension',
  ));
  db_add_index($ret, 'boost_cache_settings', 'extension', array(
    'extension',
  ));
  _boost_install_set_time_limit(0);
  ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
  return $ret;
}