Bugzilla – Attachment 87774 Details for
Bug 22642
DB upgrade 18.06.00.005 can fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22642: Corrections to updatedatebase for bug 12395
Bug-22642-Corrections-to-updatedatebase-for-bug-12.patch (text/plain), 1.70 KB, created by
Katrin Fischer
on 2019-04-11 14:41:59 UTC
(
hide
)
Description:
Bug 22642: Corrections to updatedatebase for bug 12395
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-11 14:41:59 UTC
Size:
1.70 KB
patch
obsolete
>From ad07ebe6d7cb3f1af9df494f6a6135ef4109dc44 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 8 Apr 2019 18:04:14 +0100 >Subject: [PATCH] Bug 22642: Corrections to updatedatebase for bug 12395 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > installer/data/mysql/updatedatabase.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d2cb81e54a..df30aacabf 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -16128,7 +16128,8 @@ if( CheckVersion( $DBversion ) ) { > unless ( foreign_key_exists('aqorders', 'aqorders_created_by') ) { > $dbh->do( "ALTER TABLE aqorders ADD CONSTRAINT aqorders_created_by FOREIGN KEY (created_by) REFERENCES borrowers (borrowernumber) ON DELETE SET NULL ON UPDATE CASCADE;" ); > } >- $dbh->do( "UPDATE aqorders, aqbasket SET aqorders.created_by = aqbasket.authorisedby WHERE aqorders.basketno = aqbasket.basketno AND aqorders.created_by IS NULL;" ); >+ $dbh->do( "UPDATE aqbasket LEFT JOIN borrowers ON ( aqbasket.authorisedby = borrowers.borrowernumber ) SET aqbasket.authorisedby = NULL WHERE borrowers.borrowernumber IS NULL;" ); >+ $dbh->do( "UPDATE aqorders LEFT JOIN aqbasket ON ( aqorders.basketno = aqbasket.basketno ) SET aqorders.created_by = aqbasket.authorisedby WHERE aqorders.created_by IS NULL;" ); > } > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 12395 - Save order line's creator)\n"; >-- >2.11.0
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 22642
:
87535
|
87552
| 87774