Bugzilla – Attachment 135358 Details for
Bug 30852
article_requests missing index on debit_id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30852: Add index on article_requests.debit_id
Bug-30852-Add-index-on-articlerequestsdebitid.patch (text/plain), 2.02 KB, created by
Fridolin Somers
on 2022-05-26 06:37:58 UTC
(
hide
)
Description:
Bug 30852: Add index on article_requests.debit_id
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-05-26 06:37:58 UTC
Size:
2.02 KB
patch
obsolete
>From 242f0917fecbdff12b9d4bb3480e3bda8acc3135 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 25 May 2022 20:32:35 -1000 >Subject: [PATCH] Bug 30852: Add index on article_requests.debit_id > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > installer/data/mysql/atomicupdate/bug_30852.pl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 17 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_30852.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30852.pl b/installer/data/mysql/atomicupdate/bug_30852.pl >new file mode 100755 >index 0000000000..c525ab040d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30852.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "30852", >+ description => "Add index to article_requests.debit_id", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ unless ( index_exists( 'article_requests', 'debit_id' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE `article_requests` >+ ADD KEY `debit_id` (`debit_id`) >+ }); >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 852d448804..001ece9f87 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -798,6 +798,7 @@ CREATE TABLE `article_requests` ( > KEY `biblionumber` (`biblionumber`), > KEY `itemnumber` (`itemnumber`), > KEY `branchcode` (`branchcode`), >+ KEY `debit_id` (`debit_id`), > CONSTRAINT `article_requests_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `article_requests_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `article_requests_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE, >-- >2.35.3
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 30852
: 135358 |
135359