Bugzilla – Attachment 17975 Details for
Bug 10185
updatedatabase.pl remove all reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10185: Add missing columns in update 3.09.00.025
PASSED-QA-Bug-10185-Add-missing-columns-in-update-.patch (text/plain), 3.31 KB, created by
Katrin Fischer
on 2013-05-07 06:48:40 UTC
(
hide
)
Description:
[PASSED QA] Bug 10185: Add missing columns in update 3.09.00.025
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-05-07 06:48:40 UTC
Size:
3.31 KB
patch
obsolete
>From 351469a3ddf1ca79d4a56ae958d9c0b42940ab50 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 6 May 2013 06:43:50 +0000 >Subject: [PATCH] [PASSED QA] Bug 10185: Add missing columns in update > 3.09.00.025 > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >SQL only changes fixing an important database update. > >IMPORTANT: Patches must be backported to all versions containing >the database update 3.09.00.025. > >I used the test plan provided by Julian with some additions: >1/ Do a fresh 3.8 install >2/ Do some reserves >3/ Check your old_reserves table is empty >4/ Update your sources to 3.10 >5/ Run updatedatabase.pl >6/ Your reserves table is now empty! > >I made sure I had item level and title level holds, also >suspended holds. > >I repeated the test with entries in my old_reserves table >(cancelled and filled holds) to make sure this is also still >working correctly. > >Before the patch we lost all suspended holds and when the >old_reserves table was empty also all holds in general. >After the patch the reserve_id is added but the other data >in both tables is not altered. > >NOTE: Adding the reserve_id first to old_reserves and then >to reserves we are missing one id in between. >old_reserves: 1,2,3 >reserves: 5,6 >--- > installer/data/mysql/updatedatabase.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d1f857f..229d3b7 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5486,13 +5486,15 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > constrainttype, branchcode, notificationdate, > reminderdate, cancellationdate, reservenotes, > priority, found, timestamp, itemnumber, >- waitingdate, expirationdate, lowestPriority >+ waitingdate, expirationdate, lowestPriority, >+ suspend, suspend_until > ) SELECT > borrowernumber, reservedate, biblionumber, > constrainttype, branchcode, notificationdate, > reminderdate, cancellationdate, reservenotes, > priority, found, timestamp, itemnumber, >- waitingdate, expirationdate, lowestPriority >+ waitingdate, expirationdate, lowestPriority, >+ suspend, suspend_until > FROM old_reserves ORDER BY reservedate > "); > $dbh->do('SET @ai = ( SELECT MAX( reserve_id ) FROM tmp_reserves )'); >@@ -5505,13 +5507,15 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > constrainttype, branchcode, notificationdate, > reminderdate, cancellationdate, reservenotes, > priority, found, timestamp, itemnumber, >- waitingdate, expirationdate, lowestPriority >+ waitingdate, expirationdate, lowestPriority, >+ suspend, suspend_until > ) SELECT > borrowernumber, reservedate, biblionumber, > constrainttype, branchcode, notificationdate, > reminderdate, cancellationdate, reservenotes, > priority, found, timestamp, itemnumber, >- waitingdate, expirationdate, lowestPriority >+ waitingdate, expirationdate, lowestPriority, >+ suspend, suspend_until > FROM reserves ORDER BY reservedate > "); > $dbh->do('TRUNCATE reserves'); >-- >1.7.9.5
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 10185
:
17934
|
17939
|
17958
|
17973
|
17974
| 17975