Projet

Général

Profil

Révision b1ab1c0c

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/entityreference/entityreference.install
163 163
    ));
164 164
  }
165 165
}
166

  
167
/**
168
 * Remove duplicate rows in the taxonomy_index table.
169
 */
170
function entityreference_update_7100() {
171
  if (db_table_exists('taxonomy_index')) {
172
    $tx_schema = drupal_get_schema('taxonomy_index');
173
    db_create_table('taxonomy_index_tmp', $tx_schema);
174
    $select = db_select('taxonomy_index', 'tx');
175
    $select->fields('tx');
176
    $select->groupBy('tx.nid');
177
    $select->groupBy('tx.tid');
178
    db_insert('taxonomy_index_tmp')->from($select)->execute();
179
    db_drop_table('taxonomy_index');
180
    db_rename_table('taxonomy_index_tmp', 'taxonomy_index');
181
  }
182
}

Formats disponibles : Unified diff