summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-11-15 13:27:45 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-11-15 13:27:45 +0000
commitd8c18ac010f925b9056daa0833f6d7a7fc34c0a8 (patch)
tree5ffbda60f419a67f5e50e7afe2d9beb932419bb3 /modules
parent940b059010a9f391195ea7f73bdabe81eb542328 (diff)
downloadbrdo-d8c18ac010f925b9056daa0833f6d7a7fc34c0a8.tar.gz
brdo-d8c18ac010f925b9056daa0833f6d7a7fc34c0a8.tar.bz2
#128866 by JirkaRybka: fix broken update path of locale tables on PostgreSQL
Diffstat (limited to 'modules')
-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;
}