Bug 31212: Add Database update

Signed-off-by: Ann Flournoy <aflournoy@cityofkeller.com>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2022-08-19 17:55:32 +00:00 committed by Tomas Cohen Arazi
parent f729d46478
commit 2c19382503
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
use Modern::Perl;
return {
bug_number => "31212",
description => "Update items.datelastseen and deleteditems.datelastseen to datetime data format",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
ALTER TABLE `items` MODIFY COLUMN `datelastseen` DATETIME DEFAULT NULL
});
$dbh->do(q{
ALTER TABLE `deleteditems` MODIFY COLUMN `datelastseen` DATETIME DEFAULT NULL
});
say $out "items and deleteditems table updated";
},
};