From ad7017fa9a21db76138a3151bf5caeebe1c9e975 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Mar 2017 15:25:55 -0300 Subject: [PATCH] Bug 18235: DB changes Signed-off-by: Nick Clemens Signed-off-by: Nicolas Legrand --- installer/data/mysql/atomicupdate/bug_xxxxx.sql | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 11 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_xxxxx.sql diff --git a/installer/data/mysql/atomicupdate/bug_xxxxx.sql b/installer/data/mysql/atomicupdate/bug_xxxxx.sql new file mode 100644 index 0000000..dbc93e7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_xxxxx.sql @@ -0,0 +1,10 @@ +ALTER TABLE search_field ADD COLUMN facet_order TINYINT(4) DEFAULT '0' AFTER type; +UPDATE search_field SET facet_order=1 WHERE name='author'; +UPDATE search_field SET facet_order=2 WHERE name='itype'; +UPDATE search_field SET facet_order=3 WHERE name='location'; +UPDATE search_field SET facet_order=4 WHERE name='su-geo'; +UPDATE search_field SET facet_order=5 WHERE name='se'; +UPDATE search_field SET facet_order=6 WHERE name='subject'; +UPDATE search_field SET facet_order=7 WHERE name='ccode'; +UPDATE search_field SET facet_order=8 WHERE name='holdingbranch'; +UPDATE search_field SET facet_order=9 WHERE name='homebranch'; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 8151a29..d87570b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1456,6 +1456,7 @@ CREATE TABLE `search_field` ( `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine', `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', + `facet_order` TINYINT(4) DEFAULT NULL COMMENT 'the order place of the field in facet list if faceted', PRIMARY KEY (`id`), UNIQUE KEY (`name` (191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- 2.1.4