From 0d1ae02441934d02470e51db95706b6dddeb20b5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Sep 2013 11:13:32 +0200 Subject: [PATCH] Bug 10807: (follow-up) make the new field search_history.type should be a varchar(16) varchar(255) is too wide for "biblio" and "authority" values. Signed-off-by: Katrin Fischer --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index ad6e530138..f083eb4397 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1910,7 +1910,7 @@ CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history `sessionid` varchar(32) NOT NULL, -- a system generated session id `query_desc` varchar(255) NOT NULL, -- the search that was performed `query_cgi` text NOT NULL, -- the string to append to the search url to rerun the search - `type` varchar(255) NOT NULL DEFAULT 'biblio', -- search type, must be 'biblio' or 'authority' + `type` varchar(16) NOT NULL DEFAULT 'biblio', -- search type, must be 'biblio' or 'authority' `total` int(11) NOT NULL, -- the total of results found `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run KEY `userid` (`userid`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f9c23ea617..62b0a6a108 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8388,7 +8388,7 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.15.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q| - ALTER TABLE search_history ADD COLUMN type VARCHAR(255) NOT NULL DEFAULT 'biblio' AFTER query_cgi + ALTER TABLE search_history ADD COLUMN type VARCHAR(16) NOT NULL DEFAULT 'biblio' AFTER query_cgi |); print "Upgrade to $DBversion done (Bug 10807 - Add db field search_history.type)\n"; SetVersion($DBversion); -- 2.11.0