You are here

function biblio_update_6018 in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 biblio.install \biblio_update_6018()

File

./biblio.install, line 1720
Install file for biblio module

Code

function biblio_update_6018() {
  $result = array();
  $result[] = update_sql("UPDATE {biblio_contributor_data} SET aka = cid WHERE aka = 0 OR aka IS NULL");
  if (!db_table_exists('biblio_u5')) {

    // we don't need to do this if upgrading from 5.x
    db_drop_primary_key($result, 'biblio_contributor_data');
    db_add_primary_key($result, 'biblio_contributor_data', array(
      'cid',
      'aka',
    ));
  }
  $result[] = update_sql("UPDATE {biblio_field_type_data} SET title = 'Keywords' WHERE title = 'Key Words' ");
  if (db_table_exists('biblio_u5')) {
    db_drop_table($result, 'biblio_u5');
  }
  return $result;
}