Bugzilla – Attachment 112935 Details for
Bug 26911
Update for 18936 can cause data loss if constraints are violated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26911: (bug 18936 follow-up) Remove invalid data before copying the circ rules
Bug-26911-bug-18936-follow-up-Remove-invalid-data-.patch (text/plain), 1.27 KB, created by
Jonathan Druart
on 2020-11-03 15:46:30 UTC
(
hide
)
Description:
Bug 26911: (bug 18936 follow-up) Remove invalid data before copying the circ rules
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-03 15:46:30 UTC
Size:
1.27 KB
patch
obsolete
>From 008eada7eaa6c1a02343494154ab4ac7d8b112d7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 Nov 2020 16:45:33 +0100 >Subject: [PATCH] Bug 26911: (bug 18936 follow-up) Remove invalid data before > copying the circ rules > >--- > installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f31a1c8fba..a881ad430f 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -20707,6 +20707,21 @@ if( CheckVersion( $DBversion ) ) { > note > ); > >+ $dbh->do(q| >+ DELETE i FROM issuingrules i >+ LEFT JOIN itemtypes it ON i.itemtype=it.itemtype >+ WHERE it.itemtype IS NULL >+ |); >+ $dbh->do(q| >+ DELETE i FROM issuingrules i >+ LEFT JOIN branches b ON i.branchcode=b.branchcode >+ WHERE b.branchcode IS NULL >+ |); >+ $dbh->do(q| >+ DELETE i FROM issuingrules i >+ LEFT JOIN categories c ON i.categorycode=c.categorycode >+ WHERE c.categorycode IS NULL >+ |); > if ( column_exists( 'issuingrules', 'categorycode' ) ) { > foreach my $column ( @columns ) { > $dbh->do(" >-- >2.20.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 26911
:
112935
|
112949
|
112950
|
112968
|
113098