From db130102de170e513274068a0e99fd4229210613 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 23 Jan 2018 12:26:26 -0300 Subject: [PATCH] Bug 18336: Add explicit index names to kohastructure.sql This patch just adds an explicit index name to the search_marc_map table. The atomicupdate on this patchset is a good example of why we better have them. Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer --- installer/data/mysql/kohastructure.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 83196abdf2..87f6bc6d50 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1379,7 +1379,7 @@ CREATE TABLE `printers` ( `printername` varchar(40) NOT NULL default '', `printqueue` varchar(20) default NULL, `printtype` varchar(20) default NULL, - PRIMARY KEY (`printername`) + PRIMARY KEY (`printername`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -1471,7 +1471,7 @@ CREATE TABLE saved_reports ( `report_id` int(11) default NULL, `report` longtext, `date_run` datetime default NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -1485,7 +1485,7 @@ CREATE TABLE `search_field` ( `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display', `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine', PRIMARY KEY (`id`), - UNIQUE KEY (`name` (191) ) + UNIQUE KEY (`name` (191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -1504,7 +1504,7 @@ CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run KEY `userid` (`userid`), KEY `sessionid` (`sessionid`), - PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Opac search history results'; -- @@ -1518,7 +1518,7 @@ CREATE TABLE `search_marc_map` ( marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for', marc_field VARCHAR(255) NOT NULL COMMENT 'the MARC specifier for this field', PRIMARY KEY(`id`), - UNIQUE key(index_name, marc_field(191), marc_type), + UNIQUE key `index_name` (`index_name`, `marc_field` (191), `marc_type`), INDEX (`index_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -1559,7 +1559,7 @@ CREATE TABLE `serial` ( -- issues related to subscriptions `claimdate` date default NULL, -- date claimed claims_count int(11) default 0, -- number of claims made related to this issue `routingnotes` text, -- notes from the routing list - PRIMARY KEY (`serialid`) + PRIMARY KEY (`serialid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- 2.14.1