function locale_update_8000

Drops textgroup support.

Update assumes i18n migrated this data before the update happened. Core never used textgroups for anything, so it is not our job to find a place for the data elsewhere.

Related topics

File

drupal/core/modules/locale/locale.install, line 364
Install, update, and uninstall functions for the Locale module.

Code

function locale_update_8000() {
  $subquery = db_select('locales_source', 'ls')
    ->fields('ls', array(
    'lid',
  ))
    ->condition('ls.textgroup', 'default', '<>');
  db_delete('locales_target')
    ->condition('lid', $subquery, 'IN')
    ->execute();
  db_delete('locales_source')
    ->condition('textgroup', 'default', '<>')
    ->execute();
  db_drop_field('locales_source', 'textgroup');
}