From 894e144303b52dda60136fe2a72cb76adc36ee1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Mon, 6 Apr 2026 22:11:49 -0300 Subject: [PATCH] Bug 42273: Fix 'idenfity' typo in categories table The categorycode column comment in the categories table had a typo: 'idenfity' instead of 'identify'. This fixes it in kohastructure.sql and adds an atomic update to correct existing installations. Test plan: 1. Apply this patch 2. Run: $ updatedatabase => SUCCESS: The atomic update is applied 3. Verify: echo "SHOW FULL COLUMNS FROM categories WHERE Field='categorycode';" | koha-mysql kohadev => SUCCESS: The comment reads 'unique primary key used to identify the patron category' 4. Sign off :-D Signed-off-by: Laura_Escamilla Signed-off-by: David Nind Signed-off-by: Lucas Gass --- .../bug_42273_fix_categories_typo.pl | 20 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_42273_fix_categories_typo.pl diff --git a/installer/data/mysql/atomicupdate/bug_42273_fix_categories_typo.pl b/installer/data/mysql/atomicupdate/bug_42273_fix_categories_typo.pl new file mode 100755 index 0000000000..1c2ba0f249 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_42273_fix_categories_typo.pl @@ -0,0 +1,20 @@ +use Modern::Perl; + +return { + bug_number => "42273", + description => "Fix 'idenfity' typo in categories table comment", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + ALTER TABLE `categories` + MODIFY COLUMN `categorycode` varchar(10) NOT NULL DEFAULT '' + COMMENT 'unique primary key used to identify the patron category' + } + ); + + say $out "Fixed typo in categories.categorycode column comment"; + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3aff8110e1..faa27cf7ea 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1801,7 +1801,7 @@ DROP TABLE IF EXISTS `categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `categories` ( - `categorycode` varchar(10) NOT NULL DEFAULT '' COMMENT 'unique primary key used to idenfity the patron category', + `categorycode` varchar(10) NOT NULL DEFAULT '' COMMENT 'unique primary key used to identify the patron category', `description` longtext DEFAULT NULL COMMENT 'description of the patron category', `enrolmentperiod` smallint(6) DEFAULT NULL COMMENT 'number of months the patron is enrolled for (will be NULL if enrolmentperioddate is set)', `enrolmentperioddate` date DEFAULT NULL COMMENT 'date the patron is enrolled until (will be NULL if enrolmentperiod is set)',