Lines 7-20
return {
Link Here
|
7 |
my ($args) = @_; |
7 |
my ($args) = @_; |
8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
9 |
|
9 |
|
10 |
$dbh->do(q{ |
10 |
unless ( column_exists( 'background_jobs', 'queue' ) ) { |
11 |
ALTER TABLE `background_jobs` |
11 |
$dbh->do(q{ |
12 |
ADD `queue` VARCHAR(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'Name of the queue the job is sent to' AFTER `type` |
12 |
ALTER TABLE `background_jobs` |
13 |
}); |
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 |
$dbh->do(q{ |
14 |
}); |
15 |
ALTER TABLE `background_jobs` |
15 |
} |
16 |
ADD KEY `queue` (`queue`) |
16 |
|
17 |
}); |
17 |
unless ( index_exists( 'background_jobs', 'queue' ) ) { |
|
|
18 |
$dbh->do(q{ |
19 |
ALTER TABLE `background_jobs` |
20 |
ADD KEY `queue` (`queue`) |
21 |
}); |
22 |
} |
18 |
|
23 |
|
19 |
say $out "Added background_jobs.queue"; |
24 |
say $out "Added background_jobs.queue"; |
20 |
}, |
25 |
}, |
21 |
- |
|
|