Koha/installer/data/mysql/db_revs/211200005.pl
Fridolin Somers e2e2e4bed2 Bug 29778: DBREv 21.12.00.005
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-09 21:04:17 -10:00

20 lines
511 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "29778",
description => "Delete orphan additional contents",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
DELETE FROM additional_contents
WHERE code NOT IN (
SELECT code FROM (
SELECT code
FROM additional_contents
WHERE lang = "default"
) as tmp
);
});
},
}