You are here

function user_badges_update_6001 in User Badges 7

Same name and namespace in other branches
  1. 6.2 user_badges.install \user_badges_update_6001()
  2. 6 user_badges.install \user_badges_update_6001()
  3. 7.2 user_badges.install \user_badges_update_6001()
  4. 7.3 user_badges.install \user_badges_update_6001()

Implements hook_update_N(). new DB structure

File

./user_badges.install, line 184
@brief User Badges install file

Code

function user_badges_update_6001() {
  db_drop_primary_key('user_badges_user');
  db_add_primary_key('user_badges_user', array(
    'bid',
    'uid',
    'type',
  ));
  db_add_index('user_badges_user', 'type', array(
    'type',
  ));

  // hook_update_N() no longer returns a $ret array. Instead, return
  // nothing or a translated string indicating the update ran successfully.
  // See http://drupal.org/node/224333#update_sql.
  return t('TODO Add a descriptive string here to show in the UI.');
}