View | Details | Raw Unified | Return to bug 11430
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 1907-1912 CREATE TABLE saved_reports ( Link Here
1907
1907
1908
DROP TABLE IF EXISTS `search_history`;
1908
DROP TABLE IF EXISTS `search_history`;
1909
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
1909
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
1910
  `ìd` int(11) NOT NULL auto_increment, -- search history id
1910
  `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber)
1911
  `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber)
1911
  `sessionid` varchar(32) NOT NULL, -- a system generated session id
1912
  `sessionid` varchar(32) NOT NULL, -- a system generated session id
1912
  `query_desc` varchar(255) NOT NULL, -- the search that was performed
1913
  `query_desc` varchar(255) NOT NULL, -- the search that was performed
Lines 1915-1921 CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history Link Here
1915
  `total` int(11) NOT NULL, -- the total of results found
1916
  `total` int(11) NOT NULL, -- the total of results found
1916
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run
1917
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run
1917
  KEY `userid` (`userid`),
1918
  KEY `userid` (`userid`),
1918
  KEY `sessionid` (`sessionid`)
1919
  KEY `sessionid` (`sessionid`),
1920
  PRIMARY KEY  (`id`)
1919
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
1921
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
1920
1922
1921
1923
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +18 lines)
Lines 7979-7984 if ( CheckVersion($DBversion) ) { Link Here
7979
    SetVersion($DBversion);
7979
    SetVersion($DBversion);
7980
}
7980
}
7981
7981
7982
7983
7984
7985
7986
7987
7988
7989
$DBversion = "3.15.00.XXX";
7990
if ( CheckVersion($DBversion) ) {
7991
    $dbh->do(q|
7992
        ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
7993
    |);
7994
    print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n";
7995
    SetVersion($DBversion);
7996
}
7997
7998
7999
7982
=head1 FUNCTIONS
8000
=head1 FUNCTIONS
7983
8001
7984
=head2 TableExists($table)
8002
=head2 TableExists($table)
7985
- 

Return to bug 11430