diff --git a/modules/locale/locale.install b/modules/locale/locale.install index a144813..43f691e 100644 --- a/modules/locale/locale.install +++ b/modules/locale/locale.install @@ -262,3 +255,21 @@ function locale_schema() { return $schema; } + +/** + * Drop 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 place + * for the data elsewhere. + */ +function locale_update_8000() { + $subquery = db_select('locales_source', 'ls') + ->fields('ls', array('lid')) + ->condition('ls.textgroup', 'default', '<>'); + db_delete('locales_target', 'lt') + ->condition('lt.lid', $subquery, 'IN'); + db_delete('locales_source') + ->condition('textgroup', 'default', '<>'); + db_drop_field('locales_source', 'textgroup'); +}