Bugzilla – Attachment 150716 Details for
Bug 22440
Improve ILL page performance by moving to server side filtering
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22440: Add missing foreign key
Bug-22440-Add-missing-foreign-key.patch (text/plain), 2.34 KB, created by
Martin Renvoize (ashimema)
on 2023-05-05 11:04:45 UTC
(
hide
)
Description:
Bug 22440: Add missing foreign key
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-05-05 11:04:45 UTC
Size:
2.34 KB
patch
obsolete
>From 022cbc95b4a534b34cc624d65d8893f89058ff70 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 30 Mar 2023 10:49:51 +0200 >Subject: [PATCH] Bug 22440: Add missing foreign key > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../atomicupdate/bug_22440_ill_requests.pl | 19 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 20 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_22440_ill_requests.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_22440_ill_requests.pl b/installer/data/mysql/atomicupdate/bug_22440_ill_requests.pl >new file mode 100755 >index 0000000000..301508143b >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22440_ill_requests.pl >@@ -0,0 +1,19 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "22440", >+ description => "Add new /ill_requests endopoint", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ if ( foreign_key_exists( 'illrequests', 'illrequests_bibfk' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE illrequests >+ ADD FOREIGN KEY illrequests_bibfk (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE; >+ }); >+ >+ say $out "Added foreign key constraint 'illrequests.illrequests_bibfk'"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 50796112dc..4b57ae21ba 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3282,6 +3282,7 @@ CREATE TABLE `illrequests` ( > KEY `illrequests_bnfk` (`borrowernumber`), > KEY `illrequests_bcfk_2` (`branchcode`), > KEY `illrequests_safk` (`status_alias`), >+ CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE >-- >2.40.1
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 22440
:
150715
| 150716 |
150717
|
150718
|
150719
|
150720
|
150721
|
150722
|
150723
|
150788
|
150789