Koha/installer/data/mysql/db_revs/211200033.pl
Fridolin Somers 51192f9895 Bug 27783: DBRev 21.12.00.033
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00

26 lines
777 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => '27783',
description => 'Add background_jobs.queue',
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
unless ( column_exists( 'background_jobs', 'queue' ) ) {
$dbh->do(q{
ALTER TABLE `background_jobs`
ADD COLUMN `queue` VARCHAR(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'Name of the queue the job is sent to' AFTER `type`
});
}
unless ( index_exists( 'background_jobs', 'queue' ) ) {
$dbh->do(q{
ALTER TABLE `background_jobs`
ADD KEY `queue` (`queue`)
});
}
say $out "Added background_jobs.queue";
},
};