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 7866-7871 if ( CheckVersion($DBversion) ) { Link Here
7866
    SetVersion($DBversion);
7866
    SetVersion($DBversion);
7867
}
7867
}
7868
7868
7869
7870
7871
7872
7873
7874
7875
7876
$DBversion = "3.15.00.XXX";
7877
if ( CheckVersion($DBversion) ) {
7878
    $dbh->do(q|
7879
        ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
7880
    |);
7881
    print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n";
7882
    SetVersion($DBversion);
7883
}
7884
7885
7886
7869
=head1 FUNCTIONS
7887
=head1 FUNCTIONS
7870
7888
7871
=head2 TableExists($table)
7889
=head2 TableExists($table)
7872
- 

Return to bug 11430