Bug 30250: Add ApplyFrameworkDefaults system preference
[koha.git] / installer / data / mysql / db_revs / 211200033.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => '27783',
5     description => 'Add background_jobs.queue',
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9
10         unless ( column_exists( 'background_jobs', 'queue' ) ) {
11             $dbh->do(q{
12                 ALTER TABLE `background_jobs`
13                 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`
14             });
15         }
16
17         unless ( index_exists( 'background_jobs', 'queue' ) ) {
18             $dbh->do(q{
19                 ALTER TABLE `background_jobs`
20                 ADD KEY `queue` (`queue`)
21             });
22         }
23
24         say $out "Added background_jobs.queue";
25     },
26 };