Bug 30889: Add comment for the new DB field
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
a0000de817
commit
b983e3c505
2 changed files with 8 additions and 4 deletions
|
@ -2,14 +2,18 @@ use Modern::Perl;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
bug_number => "30889",
|
bug_number => "30889",
|
||||||
description => "Add context to background_jobs",
|
description => "Add calling context information to background_jobs",
|
||||||
up => sub {
|
up => sub {
|
||||||
my ($args) = @_;
|
my ($args) = @_;
|
||||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||||
|
|
||||||
unless( column_exists( 'background_jobs', 'context') ) {
|
unless( column_exists( 'background_jobs', 'context') ) {
|
||||||
$dbh->do(q{ ALTER TABLE background_jobs ADD `context` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `data` });
|
$dbh->do(q{
|
||||||
say $out "field added";
|
ALTER TABLE background_jobs
|
||||||
|
ADD `context` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL
|
||||||
|
COMMENT 'JSON-serialized context information for the job'
|
||||||
|
AFTER `data`
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -984,7 +984,7 @@ CREATE TABLE `background_jobs` (
|
||||||
`type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
`queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'Name of the queue the job is sent to',
|
`queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'Name of the queue the job is sent to',
|
||||||
`data` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`data` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
`context` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`context` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'JSON-serialized context information for the job',
|
||||||
`enqueued_on` datetime DEFAULT NULL,
|
`enqueued_on` datetime DEFAULT NULL,
|
||||||
`started_on` datetime DEFAULT NULL,
|
`started_on` datetime DEFAULT NULL,
|
||||||
`ended_on` datetime DEFAULT NULL,
|
`ended_on` datetime DEFAULT NULL,
|
||||||
|
|
Loading…
Reference in a new issue