You are here

function qpcache_update_6100 in QueryPath 6

Same name and namespace in other branches
  1. 7.3 qpcache/qpcache.install \qpcache_update_6100()
  2. 7.2 qpcache/qpcache.install \qpcache_update_6100()

The installer file for qpcache. @file

File

qpcache/qpcache.install, line 8
The installer file for qpcache.

Code

function qpcache_update_6100() {
  $spec = array(
    'type' => 'int',
    'not null' => TRUE,
    'unsigned' => FALSE,
    'default' => 0,
  );
  $indexes = array(
    //'primary key' => array('cid'),
    'unique keys' => array(
      'hash' => array(
        'crckey',
        'hashkey',
      ),
    ),
  );
  $ret = array();

  // None of these work on MySQL: Illegal to drop primary key index,
  // illegal to drop other indices.

  //db_drop_primary_key($ret, 'qpcache_xmlcache');

  //db_drop_index($ret, 'qpcache_xmlcache', 'by_key');

  //db_drop_index($ret, 'qpcache_xmlcache', 'expire');
  db_change_field($ret, 'qpcache_xmlcache', 'crckey', 'crckey', $spec, $indexes);
  return $ret;
}