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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 1939-1944 CREATE TABLE saved_reports ( Link Here
1939
1939
1940
DROP TABLE IF EXISTS `search_history`;
1940
DROP TABLE IF EXISTS `search_history`;
1941
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
1941
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
1942
  `ìd` int(11) NOT NULL auto_increment, -- search history id
1942
  `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber)
1943
  `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber)
1943
  `sessionid` varchar(32) NOT NULL, -- a system generated session id
1944
  `sessionid` varchar(32) NOT NULL, -- a system generated session id
1944
  `query_desc` varchar(255) NOT NULL, -- the search that was performed
1945
  `query_desc` varchar(255) NOT NULL, -- the search that was performed
Lines 1947-1953 CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history Link Here
1947
  `total` int(11) NOT NULL, -- the total of results found
1948
  `total` int(11) NOT NULL, -- the total of results found
1948
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run
1949
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run
1949
  KEY `userid` (`userid`),
1950
  KEY `userid` (`userid`),
1950
  KEY `sessionid` (`sessionid`)
1951
  KEY `sessionid` (`sessionid`),
1952
  PRIMARY KEY  (`id`)
1951
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
1953
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
1952
1954
1953
1955
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +18 lines)
Lines 9534-9539 if( CheckVersion($DBversion) ){ Link Here
9534
    SetVersion($DBversion);
9534
    SetVersion($DBversion);
9535
}
9535
}
9536
9536
9537
9538
9539
9540
9541
9542
9543
9544
$DBversion = "3.17.00.XXX";
9545
if ( CheckVersion($DBversion) ) {
9546
    $dbh->do(q|
9547
        ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY(id);
9548
    |);
9549
    print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n";
9550
    SetVersion($DBversion);
9551
}
9552
9553
9554
9537
=head1 FUNCTIONS
9555
=head1 FUNCTIONS
9538
9556
9539
=head2 TableExists($table)
9557
=head2 TableExists($table)
9540
- 

Return to bug 11430