function similarterms_update_7102 in Similar By Terms 7
Implements hook_update().
File
- ./
similarterms.install, line 60 - Similar By Terms install file
Code
function similarterms_update_7102() {
$schema['similarterms_override'] = array(
'module' => 'similarterms',
'description' => 'Override information for the similarterms blocks implemented as node type.',
'fields' => array(
'nid' => array(
'description' => 'Node identifier',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => 'Version identifier',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'path' => array(
'description' => 'Node Id to point to of overide',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
'weight' => array(
'description' => 'Node weight',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
),
'indexes' => array(
'nid' => array(
'nid',
),
'vid' => array(
'vid',
),
),
);
if (!db_table_exists('similarterms_override')) {
db_create_table('similarterms_override', $schema['similarterms_override']);
}
if (db_table_exists('cache_similarterms')) {
db_drop_table('cache_similarterms');
}
$schema['cache_similarterms'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_similarterms']['module'] = 'similarterms';
$schema['cache_similarterms']['description'] = 'Cache table for the Similar by Terms Module.';
db_create_table('cache_similarterms', $schema['cache_similarterms']);
variable_del('multi_select_and_tags');
}