Bug 23295: DBRev 24.06.00.040
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
82638e85b5
commit
4a6352376e
3 changed files with 10 additions and 18 deletions
2
Koha.pm
2
Koha.pm
|
@ -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.06.00.039";
|
||||
$VERSION = "24.06.00.040";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "23295",
|
||||
description => "Automatically debar patrons if SMS or email notice fail",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(
|
||||
q{ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('RestrictPatronsWithFailedNotices', '0', NULL, 'If enabled then when SMS and email notices fail sending at the Koha level then a debarment will be applied to a patrons account', 'YesNo') }
|
||||
);
|
||||
|
||||
say $out "Added system preference 'RestrictPatronsWithFailedNotices'";
|
||||
},
|
||||
};
|
|
@ -7,13 +7,21 @@ return {
|
|||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(
|
||||
q{ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('RestrictPatronsWithFailedNotices', '0', NULL, 'If enabled then when SMS and email notices fail sending at the Koha level then a debarment will be applied to a patrons account', 'YesNo') }
|
||||
);
|
||||
|
||||
say_success ( $out, "Added new system preference 'RestrictPatronsWithFailedNotices'" );
|
||||
|
||||
try {
|
||||
$dbh->do(
|
||||
q{INSERT IGNORE INTO restriction_types (code, display_text, is_system, is_default) VALUES ('NOTICE_FAILURE_SUSPENSION', 'Notice failure suspension', 1, 0)}
|
||||
);
|
||||
say_success( $out, "Added a new system restriction_types 'NOTICE_FAILURE_SUSPENSION'" );
|
||||
say_success( $out, "Added new system restriction type 'NOTICE_FAILURE_SUSPENSION'" );
|
||||
} catch {
|
||||
say_failure( $out, "Database modification failed with errors: $_" );
|
||||
};
|
||||
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue