From 6d4b2018236e3a4e62121b66eddfd1e918f073b5 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 2 Jan 2024 11:55:36 +0000 Subject: [PATCH] Bug 35539: Remove 'bulk' column/field from categories table Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- Koha/Patron/Category.pm | 1 - .../data/mysql/en/optional/patron_categories.yml | 12 ------------ installer/data/mysql/kohastructure.sql | 1 - t/db_dependent/Circulation/GetHardDueDate.t | 16 +++++++--------- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/Koha/Patron/Category.pm b/Koha/Patron/Category.pm index 5d307a4daf..65e76e5665 100644 --- a/Koha/Patron/Category.pm +++ b/Koha/Patron/Category.pm @@ -288,7 +288,6 @@ sub to_api_mapping { upperagelimit => 'upper_age_limit', dateofbirthrequired => 'lower_age_limit', finetype => undef, # Unused - bulk => undef, # Unused enrolmentfee => 'enrolment_fee', overduenoticerequired => 'overdue_notice_required', issuelimit => undef, # Unused diff --git a/installer/data/mysql/en/optional/patron_categories.yml b/installer/data/mysql/en/optional/patron_categories.yml index 3fb0a13ef8..67dd3e1c96 100644 --- a/installer/data/mysql/en/optional/patron_categories.yml +++ b/installer/data/mysql/en/optional/patron_categories.yml @@ -53,7 +53,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -67,7 +66,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -81,7 +79,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -96,7 +93,6 @@ tables: upperagelimit: 17 dateofbirthrequired: 5 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -110,7 +106,6 @@ tables: upperagelimit: 17 dateofbirthrequired: 5 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -124,7 +119,6 @@ tables: upperagelimit: 17 dateofbirthrequired: 5 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -139,7 +133,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 0 issuelimit: ~ @@ -153,7 +146,6 @@ tables: upperagelimit: 17 dateofbirthrequired: 5 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -168,7 +160,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -182,7 +173,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -196,7 +186,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -211,7 +200,6 @@ tables: upperagelimit: 999 dateofbirthrequired: 18 finetype: ~ - bulk: ~ enrolmentfee: '0.000000' overduenoticerequired: 0 issuelimit: ~ diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 8a6a1c2617..78e1efb30f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1789,7 +1789,6 @@ CREATE TABLE `categories` ( `upperagelimit` smallint(6) DEFAULT NULL COMMENT 'age limit for the patron', `dateofbirthrequired` tinyint(1) DEFAULT NULL COMMENT 'the minimum age required for the patron category', `finetype` varchar(30) DEFAULT NULL COMMENT 'unused in Koha', - `bulk` tinyint(1) DEFAULT NULL, `enrolmentfee` decimal(28,6) DEFAULT NULL COMMENT 'enrollment fee for the patron', `overduenoticerequired` tinyint(1) DEFAULT NULL COMMENT 'are overdue notices sent to this patron category (1 for yes, 0 for no)', `issuelimit` smallint(6) DEFAULT NULL COMMENT 'unused in Koha', diff --git a/t/db_dependent/Circulation/GetHardDueDate.t b/t/db_dependent/Circulation/GetHardDueDate.t index 53ee08395d..bbd046a658 100755 --- a/t/db_dependent/Circulation/GetHardDueDate.t +++ b/t/db_dependent/Circulation/GetHardDueDate.t @@ -80,7 +80,6 @@ my $samplecat = { enrolmentperioddate => undef, dateofbirthrequired => undef, finetype => undef, - bulk => undef, enrolmentfee => undef, overduenoticerequired => undef, issuelimit => undef, @@ -89,16 +88,15 @@ my $samplecat = { category_type => 'A', }; my $query = -"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired ,finetype,bulk,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?)"; +"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired ,finetype,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?)"; $dbh->do( $query, {}, - $samplecat->{categorycode}, $samplecat->{description}, - $samplecat->{enrolmentperiod}, $samplecat->{enrolmentperioddate}, - $samplecat->{dateofbirthrequired}, $samplecat->{finetype}, - $samplecat->{bulk}, $samplecat->{enrolmentfee}, - $samplecat->{overduenoticerequired}, $samplecat->{issuelimit}, - $samplecat->{reservefee}, $samplecat->{hidelostitems}, - $samplecat->{category_type} + $samplecat->{categorycode}, $samplecat->{description}, + $samplecat->{enrolmentperiod}, $samplecat->{enrolmentperioddate}, + $samplecat->{dateofbirthrequired}, $samplecat->{finetype}, + $samplecat->{enrolmentfee}, $samplecat->{overduenoticerequired}, + $samplecat->{issuelimit}, $samplecat->{reservefee}, + $samplecat->{hidelostitems}, $samplecat->{category_type} ); my $builder = t::lib::TestBuilder->new; -- 2.39.5