Bug 24239: (QA follow-up) Make dbrev idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2022-06-23 15:50:34 -03:00
parent 5c665cfb24
commit 33e6256619
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 9 additions and 6 deletions

View File

@ -1,15 +1,18 @@
use Modern::Perl;
return {
bug_number => "24239",
bug_number => "24239",
description => "Add due_date to illrequests",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(q{
ALTER TABLE `illrequests`
ADD `due_date` datetime DEFAULT NULL AFTER `biblio_id`
});
unless ( column_exists( 'illrequests', 'due_date' ) ) {
$dbh->do(q{
ALTER TABLE `illrequests`
ADD COLUMN `due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation'
AFTER `biblio_id`
});
}
},
};