5 my $dbh=C4::Context->dbh;
7 $dbh->do("INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('EnableOpacSearchHistory', '1', '', 'Enable or disable opac search history', 'YesNo')");
10 CREATE TABLE IF NOT EXISTS `search_history` (
11 `userid` int(11) NOT NULL,
12 `sessionid` varchar(32) NOT NULL,
13 `query_desc` varchar(255) NOT NULL,
14 `query_cgi` varchar(255) NOT NULL,
15 `total` int(11) NOT NULL,
16 `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
17 KEY `userid` (`userid`),
18 KEY `sessionid` (`sessionid`)
19 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
24 print "Upgrade done (added OPAC search history preference and table)\n";