Bug 30301: Add a new column to enforce the expiry notice

Signed-off-by: Hanna Leiker <tech.hanna@salinapublic.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2024-12-03 16:50:43 +00:00 committed by Katrin Fischer
parent c0b3310ab8
commit c882117b95
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,23 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => "30301",
description => "Add a flag to enforce expiry notices",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
unless ( column_exists( 'categories', 'enforce_expiry_notice' ) ) {
$dbh->do(
q{
ALTER TABLE categories ADD COLUMN `enforce_expiry_notice` tinyint(1) NOT NULL DEFAULT 0
COMMENT "enforce the patron expiry notice for this category"
AFTER `noissueschargeguarantorswithguarantees`
}
);
say_success( $out, "Added column 'enforce_expiry_notice' to categories" );
}
},
};

View File

@ -1820,6 +1820,7 @@ CREATE TABLE `categories` (
`noissuescharge` int(11) DEFAULT NULL COMMENT 'define maximum amount outstanding before checkouts are blocked',
`noissueschargeguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount that the guarantees of a patron in this category can have outstanding before checkouts are blocked',
`noissueschargeguarantorswithguarantees` int(11) DEFAULT NULL COMMENT 'define maximum amount that the guarantors with guarantees of a patron in this category can have outstanding before checkouts are blocked',
`enforce_expiry_notice` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'enforce the patron expiry notice for this category',
PRIMARY KEY (`categorycode`),
UNIQUE KEY `categorycode` (`categorycode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;