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 8570-8575 if ( CheckVersion($DBversion) ) { Link Here
8570
    SetVersion($DBversion);
8570
    SetVersion($DBversion);
8571
}
8571
}
8572
8572
8573
8574
8575
8576
8577
8578
8579
8580
$DBversion = "3.17.00.XXX";
8581
if ( CheckVersion($DBversion) ) {
8582
    $dbh->do(q|
8583
        ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY(id);
8584
    |);
8585
    print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n";
8586
    SetVersion($DBversion);
8587
}
8588
8589
8590
8573
=head1 FUNCTIONS
8591
=head1 FUNCTIONS
8574
8592
8575
=head2 TableExists($table)
8593
=head2 TableExists($table)
8576
- 

Return to bug 11430