Koha/installer/data/mysql/db_revs/221200001.pl
Tomas Cohen Arazi 6d6aa25524
Bug 32330: DBRev 22.12.00.001
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-19 10:17:26 -03:00

25 lines
800 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "32330",
description => "Add indexes to background_jobs table",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
unless ( index_exists('background_jobs', 'borrowernumber') ) {
$dbh->do(q{
ALTER TABLE `background_jobs` ADD INDEX `borrowernumber` (`borrowernumber`)
});
}
unless ( index_exists('background_jobs', 'queue') ) {
$dbh->do(q{
ALTER TABLE `background_jobs` ADD INDEX `queue` (`queue`)
});
}
unless ( index_exists('background_jobs', 'status') ) {
$dbh->do(q{
ALTER TABLE `background_jobs` ADD INDEX `status` (`status`)
});
}
},
};