function nodewords_update_6178 in Nodewords: D6 Meta Tags 6.2
Implements hook_update_N().
File
- ./
nodewords.install, line 1068 - Install, update and uninstall functions for the Nodewords module.
Code
function nodewords_update_6178() {
$ret = array();
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_change_field($ret, 'nodewords', 'id', 'id', array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
));
$ret[] = update_sql("UPDATE {nodewords} set id = '0' WHERE id = '' OR id IS NULL");
db_change_field($ret, 'nodewords', 'id', 'id', array(
'type' => 'int',
'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;
}