From e9d1a1022aab2a334a7b9dbfc7dd24a76334a2b3 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Thu, 9 May 2024 20:08:34 +0000 Subject: [PATCH] Bug 35145: (follow-up) Fix atomicupdate file and display_order's data type PA amended: Added DEFAULT NULL COMMENT 'the order in which this attribute type appears in patron form' to column entry to match what's in kohastructure.sql Signed-off-by: Pedro Amorim Signed-off-by: Kyle M Hall --- Koha/Schema/Result/BorrowerAttributeType.pm | 2 +- .../mysql/atomicupdate/bug_35145_order_patron_attributes.pl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm index d163621fff9..4c55d905a60 100644 --- a/Koha/Schema/Result/BorrowerAttributeType.pm +++ b/Koha/Schema/Result/BorrowerAttributeType.pm @@ -187,7 +187,7 @@ __PACKAGE__->add_columns( "mandatory", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "display_order", - { data_type => "int", is_nullable => 1 }, + { data_type => "integer", is_nullable => 1 }, ); =head1 PRIMARY KEY diff --git a/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl b/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl index b1650cd3789..b6b7ef29c8c 100755 --- a/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl +++ b/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl @@ -11,12 +11,13 @@ return { $dbh->do( q{ ALTER TABLE borrower_attribute_types - ADD display_order int(11); + ADD COLUMN IF NOT EXISTS display_order int(11) DEFAULT NULL COMMENT + 'the order in which this attribute type appears in patron form' } ); # Print useful stuff here # tables - say $out "Added column 'borrower_attribute_types.number'"; + say $out "Added column 'borrower_attribute_types.display_order'"; }, }; -- 2.30.2