function flag_update_6206 in Flag 7.2
Same name and namespace in other branches
- 6.2 flag.install \flag_update_6206()
- 7.3 flag.install \flag_update_6206()
Correction to flag_update_6205(). Convert unique key to an index.
File
- ./
flag.install, line 428 - Flag module install/schema/update hooks.
Code
function flag_update_6206() {
// Remove the old index that did not include UID or SID.
if (db_index_exists('flag_content', 'content_type_content_id')) {
db_drop_index('flag_content', 'content_type_content_id');
}
// Remove the erroneous unique key that was added in flag_update_6205().
if (db_index_exists('flag_content', 'content_type_content_id_uid_sid')) {
db_drop_unique_key('flag_content', 'content_type_content_id_uid_sid');
}
db_add_index('flag_content', 'content_type_content_id_uid_sid', array(
'content_type',
'content_id',
'uid',
'sid',
));
}