#128866 by JirkaRybka: fix broken update path of locale tables on PostgreSQL
parent
940b059010
commit
d8c18ac010
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue