From 7e133661f1c2dbc83b7648904df0d1e3977424d2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Oct 2025 16:52:08 +0200 Subject: [PATCH] Bug 36033: Fix DB struct diff Signed-off-by: Lucas Gass --- installer/data/mysql/db_revs/250600011.pl | 5 +++++ installer/data/mysql/kohastructure.sql | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/db_revs/250600011.pl b/installer/data/mysql/db_revs/250600011.pl index a7cec777c74..3195b4d7455 100755 --- a/installer/data/mysql/db_revs/250600011.pl +++ b/installer/data/mysql/db_revs/250600011.pl @@ -47,6 +47,11 @@ return { ); } + unless ( index_exists( 'statistics', 'illrequest_idx' ) ) { + $dbh->do(q{ALTER TABLE `statistics` ADD INDEX `illrequest_idx` (`illrequest_id`)}); + + } + my $reports = join( "\n", map( "\tReport ID: " diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e391dc68f5d..cf30e5b30b2 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -6122,11 +6122,11 @@ CREATE TABLE `statistics` ( KEY `timeidx` (`datetime`), KEY `branch_idx` (`branch`), KEY `type_idx` (`type`), - KEY `illrequest_idx` (`illrequest_id`), KEY `itemnumber_idx` (`itemnumber`), KEY `itemtype_idx` (`itemtype`), KEY `borrowernumber_idx` (`borrowernumber`), - KEY `ccode_idx` (`ccode`) + KEY `ccode_idx` (`ccode`), + KEY `illrequest_idx` (`illrequest_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- 2.39.5