From 5600e9148dc31f88a4f6a938c9b20bab9feba579 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 21 Sep 2018 10:42:41 +0000 Subject: [PATCH] Bug 15516: (follow-up) Fix kohastructure.sql Signed-off-by: Josef Moravec Signed-off-by: Michal Denar Signed-off-by: Michal Denar --- installer/data/mysql/kohastructure.sql | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 36e607422c..59f94b2f62 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1778,9 +1778,7 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) - ON DELETE SET NULL ON UPDATE SET NULL, - CONSTRAINT `old_reserves_ibfk_5` FOREIGN KEY (hold_group_id) REFERENCES hold_group (hold_group_id) - ON DELETE SET NULL ON UPDATE CASCADE + ON DELETE SET NULL ON UPDATE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -1859,6 +1857,16 @@ CREATE TABLE `patronimage` ( -- information related to patron images ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- +-- Table structure for table hold_group +-- + +DROP TABLE IF EXISTS `hold_group`; +CREATE TABLE `hold_group` ( + `hold_group_id` int unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY(`hold_group_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -- Table structure for table `reserves` -- @@ -1900,16 +1908,6 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- --- Table structure for table hold_group --- - -DROP TABLE IF EXISTS `hold_group`; -CREATE TABLE `hold_group` ( - `hold_group_id` int unsigned NOT NULL AUTO_INCREMENT, - PRIMARY KEY(`hold_group_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- -- Table structure for table `old_reserves` -- @@ -1948,7 +1946,9 @@ CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b 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 + ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `old_reserves_ibfk_5` FOREIGN KEY (hold_group_id) REFERENCES hold_group (hold_group_id) + ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- 2.11.0