summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/locale/locale.install19
1 files changed, 18 insertions, 1 deletions
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index 5d12b3d36..f06c2ece3 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -110,7 +110,24 @@ function locale_update_6004() {
*/
function locale_update_6005() {
$ret = array();
- $ret[] = update_sql("DELETE s FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid WHERE t.lid IS NULL");
+ $ret[] = update_sql("DELETE FROM {locales_source} WHERE lid NOT IN (SELECT lid FROM {locales_target})");
+ return $ret;
+}
+
+/**
+ * Fix remaining inconsistent indexes.
+ */
+function locale_update_6006() {
+ $ret = array();
+ db_add_index($ret, 'locales_target', 'language', array('language'));
+
+ switch ($GLOBALS['db_type']) {
+ case 'pgsql':
+ db_drop_index($ret, 'locales_source', 'source');
+ db_add_index($ret, 'locales_source', 'source', array(array('source', 30)));
+ break;
+ }
+
return $ret;
}