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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 1908-1913 CREATE TABLE saved_reports ( Link Here
1908
1908
1909
DROP TABLE IF EXISTS `search_history`;
1909
DROP TABLE IF EXISTS `search_history`;
1910
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
1910
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
1911
  `ìd` int(11) NOT NULL auto_increment, -- search history id
1911
  `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber)
1912
  `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber)
1912
  `sessionid` varchar(32) NOT NULL, -- a system generated session id
1913
  `sessionid` varchar(32) NOT NULL, -- a system generated session id
1913
  `query_desc` varchar(255) NOT NULL, -- the search that was performed
1914
  `query_desc` varchar(255) NOT NULL, -- the search that was performed
Lines 1916-1922 CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history Link Here
1916
  `total` int(11) NOT NULL, -- the total of results found
1917
  `total` int(11) NOT NULL, -- the total of results found
1917
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run
1918
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run
1918
  KEY `userid` (`userid`),
1919
  KEY `userid` (`userid`),
1919
  KEY `sessionid` (`sessionid`)
1920
  KEY `sessionid` (`sessionid`),
1921
  PRIMARY KEY  (`id`)
1920
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
1922
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
1921
1923
1922
1924
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +18 lines)
Lines 8560-8565 if ( CheckVersion($DBversion) ) { Link Here
8560
    SetVersion($DBversion);
8560
    SetVersion($DBversion);
8561
}
8561
}
8562
8562
8563
8564
8565
8566
8567
8568
8569
8570
$DBversion = "3.15.00.XXX";
8571
if ( CheckVersion($DBversion) ) {
8572
    $dbh->do(q|
8573
        ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
8574
    |);
8575
    print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n";
8576
    SetVersion($DBversion);
8577
}
8578
8579
8580
8563
=head1 FUNCTIONS
8581
=head1 FUNCTIONS
8564
8582
8565
=head2 TableExists($table)
8583
=head2 TableExists($table)
8566
- 

Return to bug 11430