From 6d53d920ccef50b24c8ba113d3d0b3469bb45f07 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Oct 2025 16:35:09 +0200 Subject: [PATCH] Bug 15516: Fix DB struct diff Signed-off-by: Lucas Gass --- installer/data/mysql/db_revs/250600012.pl | 6 ++-- installer/data/mysql/kohastructure.sql | 36 +++++++++++------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/installer/data/mysql/db_revs/250600012.pl b/installer/data/mysql/db_revs/250600012.pl index d860fbb8aaf..7080c55194e 100755 --- a/installer/data/mysql/db_revs/250600012.pl +++ b/installer/data/mysql/db_revs/250600012.pl @@ -10,7 +10,7 @@ return { unless ( TableExists('hold_groups') ) { $dbh->do( q{CREATE TABLE hold_groups ( - hold_group_id int unsigned NOT NULL AUTO_INCREMENT, + hold_group_id int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (hold_group_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci} ); @@ -18,7 +18,7 @@ return { unless ( column_exists( 'reserves', 'hold_group_id' ) ) { $dbh->do( - q{ALTER TABLE reserves ADD COLUMN hold_group_id int unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked' AFTER non_priority} + q{ALTER TABLE reserves ADD COLUMN hold_group_id int(10) unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked' AFTER non_priority} ); $dbh->do(q{ALTER TABLE reserves ADD KEY reserves_ibfk_hg (hold_group_id)}); $dbh->do( @@ -28,7 +28,7 @@ return { unless ( column_exists( 'old_reserves', 'hold_group_id' ) ) { $dbh->do( - q{ALTER TABLE old_reserves ADD COLUMN hold_group_id int unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked' AFTER non_priority} + q{ALTER TABLE old_reserves ADD COLUMN hold_group_id int(10) unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked' AFTER non_priority} ); $dbh->do(q{ALTER TABLE old_reserves ADD KEY old_reserves_ibfk_hg (hold_group_id)}); $dbh->do( diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index bc907e893d5..6b945139528 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3515,6 +3515,18 @@ CREATE TABLE `hold_fill_targets` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `hold_groups` +-- +DROP TABLE IF EXISTS `hold_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE hold_groups ( + `hold_group_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`hold_group_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `housebound_profile` -- @@ -5068,18 +5080,6 @@ CREATE TABLE `old_issues` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `hold_groups` --- -DROP TABLE IF EXISTS `hold_groups`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE hold_groups ( - hold_group_id int unsigned NOT NULL AUTO_INCREMENT, - PRIMARY KEY (hold_group_id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `old_reserves` -- @@ -5114,7 +5114,7 @@ CREATE TABLE `old_reserves` ( `itemtype` varchar(10) DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', `item_level_hold` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hold placed at item level', `non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is this a non priority hold', - `hold_group_id` int unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked', + `hold_group_id` int(10) unsigned DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked', PRIMARY KEY (`reserve_id`), KEY `old_reserves_borrowernumber` (`borrowernumber`), KEY `old_reserves_biblionumber` (`biblionumber`), @@ -5128,8 +5128,8 @@ CREATE TABLE `old_reserves` ( CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE SET NULL, CONSTRAINT `old_reserves_ibfk_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `old_reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE SET NULL, - CONSTRAINT `old_reserves_ibfk_hg` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE SET NULL ON UPDATE SET NULL + CONSTRAINT `old_reserves_ibfk_hg` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `old_reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5686,7 +5686,7 @@ CREATE TABLE `reserves` ( `itemtype` varchar(10) DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', `item_level_hold` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hold placed at item level', `non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is this a non priority hold', - `hold_group_id` int unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked', + `hold_group_id` int(10) unsigned DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked', PRIMARY KEY (`reserve_id`), KEY `priorityfoundidx` (`priority`,`found`), KEY `borrowernumber` (`borrowernumber`), @@ -5703,8 +5703,8 @@ CREATE TABLE `reserves` ( CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `reserves_ibfk_hg` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE SET NULL ON UPDATE CASCADE + CONSTRAINT `reserves_ibfk_hg` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- 2.39.5