Commit d8c18ac0 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#128866 by JirkaRybka: fix broken update path of locale tables on PostgreSQL

parent 940b0590
......@@ -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)));
return $ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment