From c90629dc600d734868eaf8f84bb7f99675df3949 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 583de56..e7f279f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1779,9 +1779,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; -- @@ -1860,6 +1858,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` -- @@ -1902,16 +1910,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` -- @@ -1951,7 +1949,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.1.4