Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d8c18ac0
Commit
d8c18ac0
authored
Nov 15, 2007
by
Gábor Hojtsy
Browse files
#128866
by JirkaRybka: fix broken update path of locale tables on PostgreSQL
parent
940b0590
Changes
1
Show whitespace changes
Inline
Side-by-side
modules/locale/locale.install
View file @
d8c18ac0
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment