Bugzilla – Attachment 28636 Details for
Bug 11430
Search history: Delete selected lines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11430: DB changes: Add the primary key for search_history
Bug-11430-DB-changes-Add-the-primary-key-for-searc.patch (text/plain), 2.23 KB, created by
Jonathan Druart
on 2014-06-03 08:49:36 UTC
(
hide
)
Description:
Bug 11430: DB changes: Add the primary key for search_history
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-06-03 08:49:36 UTC
Size:
2.23 KB
patch
obsolete
>From bf8ee9ac688acb319e5722797ee562d6aec67d0c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 20 Dec 2013 15:03:16 +0100 >Subject: [PATCH] Bug 11430: DB changes: Add the primary key for search_history > >Adds a primary key search_history.id. >--- > installer/data/mysql/kohastructure.sql | 4 +++- > installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ > 2 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index b46dc6a..fa722a4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1908,6 +1908,7 @@ CREATE TABLE saved_reports ( > > DROP TABLE IF EXISTS `search_history`; > CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history >+ `ìd` int(11) NOT NULL auto_increment, -- search history id > `userid` int(11) NOT NULL, -- the patron who performed the search (borrowers.borrowernumber) > `sessionid` varchar(32) NOT NULL, -- a system generated session id > `query_desc` varchar(255) NOT NULL, -- the search that was performed >@@ -1916,7 +1917,8 @@ CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history > `total` int(11) NOT NULL, -- the total of results found > `time` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the search was run > KEY `userid` (`userid`), >- KEY `sessionid` (`sessionid`) >+ KEY `sessionid` (`sessionid`), >+ PRIMARY KEY (`id`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results'; > > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 01472d7..0583f83 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8551,6 +8551,24 @@ if (CheckVersion($DBversion)) { > SetVersion($DBversion); > } > >+ >+ >+ >+ >+ >+ >+ >+$DBversion = "3.15.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q| >+ ALTER TABLE search_history ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY >+ |); >+ print "Upgrade to $DBversion done (Bug 11430 - Add primary key for search_history)\n"; >+ SetVersion($DBversion); >+} >+ >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >2.0.0.rc2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11430
:
23713
|
23714
|
23715
|
23716
|
23717
|
23718
|
25499
|
25500
|
25501
|
25502
|
25503
|
25504
|
25618
|
28636
|
28637
|
28638
|
28639
|
28640
|
28641
|
28642
|
29042
|
29043
|
29044
|
29045
|
29046
|
29047
|
29048
|
29059
|
29081
|
29082
|
29083
|
29084
|
29085
|
29106
|
29107
|
29108
|
29109
|
29110
|
29592
|
29635
|
29636
|
29637
|
29638
|
29639
|
29640
|
33831
|
33832
|
33833
|
33834
|
33835
|
33836
|
36444
|
36820
|
36821
|
36822