You are here

function biblio_update_6018 in Bibliography Module 6.2

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

Update ...

This update function ...

Return value

array An array of associaive arrays with 'success' and 'query' keys.

File

./biblio.install, line 2315
Install, update, and uninstall functions for the 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;
}