function nodewords_update_6169 in Nodewords: D6 Meta Tags 6.2
Same name and namespace in other branches
- 6 nodewords.install \nodewords_update_6169()
Implements hook_update_N().
File
- ./
nodewords.install, line 991 - Install, update and uninstall functions for the Nodewords module.
Code
function nodewords_update_6169() {
$ret = array();
if (!db_column_exists('nodewords', 'type')) {
db_add_field($ret, 'nodewords', 'type', array(
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_add_index($ret, 'nodewords', 'nodewords_type_id', array(
'type',
'id',
));
db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name', array(
'type',
'id',
'name',
));
}
else {
db_drop_index($ret, 'nodewords', 'nodewords_type_id');
db_drop_unique_key($ret, 'nodewords', 'nodewords_type_id_name');
db_change_field($ret, 'nodewords', 'type', 'type', array(
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_add_index($ret, 'nodewords', 'nodewords_type_id', array(
'type',
'id',
));
db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name', array(
'type',
'id',
'name',
));
}
return $ret;
}