function _votingapi_update_6001 in Voting API 6
File
- ./
votingapi.install, line 208
Code
function _votingapi_update_6001() {
$ret = array();
// Rename the 'hostname' field to 'vote_source' for more flexibility
db_change_field($ret, 'votingapi_vote', 'hostname', 'vote_source', array(
'type' => 'varchar',
'length' => 255,
));
// Update fields and indexes
db_update_field($ret, 'votingapi_vote', 'vote_id');
db_update_field($ret, 'votingapi_vote', 'content_type');
db_update_field($ret, 'votingapi_vote', 'content_id');
db_update_field($ret, 'votingapi_vote', 'value');
db_update_field($ret, 'votingapi_vote', 'value_type');
db_update_field($ret, 'votingapi_vote', 'tag');
db_update_field($ret, 'votingapi_vote', 'uid');
db_update_field($ret, 'votingapi_vote', 'timestamp');
db_update_field($ret, 'votingapi_vote', 'vote_source');
// Update fields and indexes
db_update_field($ret, 'votingapi_cache', 'vote_cache_id');
db_update_field($ret, 'votingapi_cache', 'content_type');
db_update_field($ret, 'votingapi_cache', 'content_id');
db_update_field($ret, 'votingapi_cache', 'value');
db_update_field($ret, 'votingapi_cache', 'value_type');
db_update_field($ret, 'votingapi_cache', 'tag');
db_update_field($ret, 'votingapi_cache', 'function');
db_update_field($ret, 'votingapi_cache', 'timestamp');
// Yes, we loves us the SchemaAPI.
return $ret;
}