You are here

function flag_update_6206 in Flag 6.2

Same name and namespace in other branches
  1. 7.3 flag.install \flag_update_6206()
  2. 7.2 flag.install \flag_update_6206()

Correction to flag_update_6205(). Convert unique key to an index.

File

./flag.install, line 622
Flag module install/schema/update hooks.

Code

function flag_update_6206() {
  $ret = array();

  // These two indexes may or may not exist depending on if flag_update_6205
  // was run or not. Surpress errors if the indexes don't exist.
  @db_drop_index($ret, 'flag_content', 'content_type_content_id');
  @db_drop_unique_key($ret, 'flag_content', 'content_type_content_id_uid_sid');

  // Empty out the errors.
  $ret = array();
  db_add_index($ret, 'flag_content', 'content_type_content_id_uid_sid', array(
    'content_type',
    'content_id',
    'uid',
    'sid',
  ));
  return $ret;
}