Bug 10807: (follow-up) make the new field search_history.type should be a varchar(16)
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 24 Sep 2013 09:13:32 +0000 (11:13 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 02:34:59 +0000 (02:34 +0000)
varchar(255) is too wide for "biblio" and "authority" values.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index ad6e530..f083eb4 100644 (file)
@@ -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`),
index f9c23ea..62b0a6a 100755 (executable)
@@ -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);