Bug 30300: DBRev 24.12.00.007

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Katrin Fischer 2025-02-03 13:16:18 +00:00
parent e9c4ce897d
commit dddacd08e2
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 7 additions and 5 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "24.12.00.006";
$VERSION = "24.12.00.007";
sub version {
return $VERSION;

View File

@ -1,8 +1,9 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => "30300",
description => "Add Patron expiry to messaging preference",
description => "Add 'patron expiry' to messaging preferences",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
@ -21,7 +22,7 @@ return {
VALUES ('Patron_Expiry', 0)
}
);
say $out "Message attribute added";
say_success( $out, "Message attribute 'Patron_Expiry' added" );
my $query = q{
SELECT message_attribute_id
FROM message_attributes
@ -43,7 +44,7 @@ return {
}, {}, $message_attribute_id, $message_attribute_id, $message_attribute_id, $message_attribute_id
);
say $out "MEMBERSHIP_EXPIRY added to message_transports";
say_success( $out, "MEMBERSHIP_EXPIRY added to message_transports" );
my $days_notice = C4::Context->preference('MembershipExpiryDaysNotice');
if ($days_notice) {
@ -71,9 +72,10 @@ return {
message_attribute_id = ?
}, {}, $message_attribute_id
);
say_success( $out, "'Patron expiry' notification activated in patron accounts" );
}
} else {
say $out "Patron_Expiry message attribute exists, skipping update";
say_success( $out, "'Patron_Expiry' message attribute already exists, skipping update" );
}
},
};