From b9712218a443c3e3b2b5ff4deb012b57b66d7e46 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 2 Apr 2025 07:59:37 +0000 Subject: [PATCH] Bug 39518: Add a new column basket_name_field Signed-off-by: Nick Clemens --- .../bug_39518-add_basket_name_field.pl | 18 ++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 19 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_39518-add_basket_name_field.pl diff --git a/installer/data/mysql/atomicupdate/bug_39518-add_basket_name_field.pl b/installer/data/mysql/atomicupdate/bug_39518-add_basket_name_field.pl new file mode 100755 index 00000000000..bc3a29cfcc9 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_39518-add_basket_name_field.pl @@ -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" ); + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 9b7dc7fc6ec..ffe824d2307 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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`), -- 2.39.5