Bug 39518: Add a new column basket_name_field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2025-04-02 07:59:37 +00:00 committed by Katrin Fischer
parent 936b5650c5
commit fe37b056b6
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => "39518",
description => "Add a field to define the basket name in the MARC order account for a vendor",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
if ( !column_exists( 'marc_order_accounts', 'basket_name_field' ) ) {
$dbh->do(
q{ ALTER TABLE marc_order_accounts ADD COLUMN `basket_name_field` varchar(10) DEFAULT NULL COMMENT 'the field that a vendor can use to include a basket name that will be used to create the basket for the file' AFTER match_value}
);
say_success( $out, "Basket name field added successfully" );
}
},
};

View File

@ -4584,6 +4584,7 @@ CREATE TABLE `marc_order_accounts` (
`encoding` varchar(50) DEFAULT NULL COMMENT 'file encoding',
`match_field` varchar(10) DEFAULT NULL COMMENT 'the field that a vendor account has been mapped to in a marc record',
`match_value` varchar(50) DEFAULT NULL COMMENT 'the value to be matched against the marc record',
`basket_name_field` varchar(10) DEFAULT NULL COMMENT 'the field that a vendor can use to include a basket name that will be used to create the basket for the file',
PRIMARY KEY (`id`),
KEY `marc_ordering_account_ibfk_1` (`vendor_id`),
KEY `marc_ordering_account_ibfk_2` (`budget_id`),