function apachesolr_update_7001 in Apache Solr Search 7
Same name and namespace in other branches
- 8 apachesolr.install \apachesolr_update_7001()
Re-jigger the schema to use fewer, shorter keys.
File
- ./
apachesolr.install, line 369 - Install and related hooks for apachesolr_search.
Code
function apachesolr_update_7001() {
if (variable_get('apachesolr_update_from_6303', FALSE)) {
return NULL;
}
if (db_field_exists('apachesolr_server', 'asid')) {
// You installed the beta1 and need to be fixed up.
db_drop_field('apachesolr_server', 'asid');
db_drop_unique_key('apachesolr_server', 'server_id');
db_add_primary_key('apachesolr_server', array(
'server_id',
));
db_drop_unique_key('apachesolr_server', 'host_post_path');
db_change_field('apachesolr_server', 'port', 'port', array(
'description' => 'Port number for the registered server',
'type' => 'int',
'not null' => TRUE,
));
}
}