Koha/installer/data/mysql/db_revs/211200050.pl
Fridolin Somers e45aef832a Bug 29924: DBRev 21.12.00.050
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-06 10:33:09 -10:00

28 lines
1.1 KiB
Perl
Executable file

use Modern::Perl;
return {
bug_number => "29924",
description => "Add password expiration",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
unless( column_exists('categories', 'password_expiry_days') ){
$dbh->do(q{
ALTER TABLE categories ADD password_expiry_days SMALLINT(5) NULL DEFAULT NULL AFTER enrolmentperioddate
});
say $out "Added password_expiry_days to categories";
}
unless( column_exists('borrowers', 'password_expiration_date') ){
$dbh->do(q{
ALTER TABLE borrowers ADD password_expiration_date DATE NULL DEFAULT NULL AFTER dateexpiry
});
say $out "Added password_expiration_date field to borrowers";
}
unless( column_exists('deletedborrowers', 'password_expiration_date') ){
$dbh->do(q{
ALTER TABLE deletedborrowers ADD password_expiration_date DATE NULL DEFAULT NULL AFTER dateexpiry
});
say $out "Added password_expiration_date field to borrowers";
}
},
};