You are here

function apachesolr_update_7015 in Apache Solr Search 8

Same name and namespace in other branches
  1. 7 apachesolr.install \apachesolr_update_7015()

Fix primary key schema mismatch for those who cleanly installed with beta16.

File

./apachesolr.install, line 881
Install and related hooks for apachesolr_search.

Code

function apachesolr_update_7015() {
  if (variable_get('apachesolr_update_from_6303', FALSE)) {
    return NULL;
  }

  // Brand new installations since update_7013 have the wrong primary key.
  db_drop_primary_key('apachesolr_index_entities');
  db_add_primary_key('apachesolr_index_entities', array(
    'entity_id',
    'entity_type',
  ));
}