From 581903289d7f2eb8fc63c48c83bccdde240c5b9b Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 2 Jan 2024 12:23:37 +0000 Subject: [PATCH] Bug 35539: Remove 'finetype' 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 | 11 +++++------ 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/Koha/Patron/Category.pm b/Koha/Patron/Category.pm index 65e76e5665..d7e7152f84 100644 --- a/Koha/Patron/Category.pm +++ b/Koha/Patron/Category.pm @@ -287,7 +287,6 @@ sub to_api_mapping { password_expiry_days => 'password_expiry_days', upperagelimit => 'upper_age_limit', dateofbirthrequired => 'lower_age_limit', - finetype => 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 67dd3e1c96..488ee9e3c4 100644 --- a/installer/data/mysql/en/optional/patron_categories.yml +++ b/installer/data/mysql/en/optional/patron_categories.yml @@ -52,7 +52,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -65,7 +64,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -78,7 +76,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -92,7 +89,6 @@ tables: enrolmentperiod: 99 upperagelimit: 17 dateofbirthrequired: 5 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -105,7 +101,6 @@ tables: enrolmentperiod: 99 upperagelimit: 17 dateofbirthrequired: 5 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -118,7 +113,6 @@ tables: enrolmentperiod: 99 upperagelimit: 17 dateofbirthrequired: 5 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -132,7 +126,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 0 issuelimit: ~ @@ -145,7 +138,6 @@ tables: enrolmentperiod: 99 upperagelimit: 17 dateofbirthrequired: 5 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -159,7 +151,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -172,7 +163,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -185,7 +175,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 1 issuelimit: ~ @@ -199,7 +188,6 @@ tables: enrolmentperiod: 99 upperagelimit: 999 dateofbirthrequired: 18 - finetype: ~ enrolmentfee: '0.000000' overduenoticerequired: 0 issuelimit: ~ diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 78e1efb30f..a70ee18722 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1788,7 +1788,6 @@ CREATE TABLE `categories` ( `password_expiry_days` smallint(6) DEFAULT NULL COMMENT 'number of days after which the patron must reset their password', `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', `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 bbd046a658..8a24c64f5c 100755 --- a/t/db_dependent/Circulation/GetHardDueDate.t +++ b/t/db_dependent/Circulation/GetHardDueDate.t @@ -79,7 +79,6 @@ my $samplecat = { enrolmentperiod => undef, enrolmentperioddate => undef, dateofbirthrequired => undef, - finetype => undef, enrolmentfee => undef, overduenoticerequired => undef, issuelimit => undef, @@ -88,15 +87,15 @@ my $samplecat = { category_type => 'A', }; my $query = -"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired ,finetype,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?)"; +"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?)"; $dbh->do( $query, {}, $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} + $samplecat->{dateofbirthrequired}, $samplecat->{enrolmentfee}, + $samplecat->{overduenoticerequired}, $samplecat->{issuelimit}, + $samplecat->{reservefee}, $samplecat->{hidelostitems}, + $samplecat->{category_type} ); my $builder = t::lib::TestBuilder->new; -- 2.39.5