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 8551-8556 if (CheckVersion($DBversion)) { Link Here
8551
    SetVersion($DBversion);
8551
    SetVersion($DBversion);
8552
}
8552
}
8553
8553
8554
8555
8556
8557
8558
8559
8560
8561
$DBversion = "3.15.00.XXX";
8562
if ( CheckVersion($DBversion) ) {
8563
    $dbh->do(q|
8564
        ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
8565
    |);
8566
    print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n";
8567
    SetVersion($DBversion);
8568
}
8569
8570
8571
8554
=head1 FUNCTIONS
8572
=head1 FUNCTIONS
8555
8573
8556
=head2 TableExists($table)
8574
=head2 TableExists($table)
8557
- 

Return to bug 11430