Bugzilla – Attachment 195031 Details for
Bug 42046
Bug 30331 database update is not idempotent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 42046: Make DR Rev 25.12.00.18 more resilient
Bug-42046-Make-DR-Rev-25120018-more-resilient.patch (text/plain), 1.47 KB, created by
Lucas Gass (lukeg)
on 2026-03-09 21:09:20 UTC
(
hide
)
Description:
Bug 42046: Make DR Rev 25.12.00.18 more resilient
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-03-09 21:09:20 UTC
Size:
1.47 KB
patch
obsolete
>From edf0bc4b248d82ce77bc9e5f212f6b6d5e3d9618 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 9 Mar 2026 21:08:44 +0000 >Subject: [PATCH] Bug 42046: Make DR Rev 25.12.00.18 more resilient > >--- > installer/data/mysql/db_revs/251200018.pl | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/db_revs/251200018.pl b/installer/data/mysql/db_revs/251200018.pl >index 7b95aa4977e..1cb92abae69 100755 >--- a/installer/data/mysql/db_revs/251200018.pl >+++ b/installer/data/mysql/db_revs/251200018.pl >@@ -12,14 +12,15 @@ return { > #Get the old value before changing anything > my $base_period = C4::Context->preference('RenewalPeriodBase'); > >- $dbh->do( >- q{ >- UPDATE systempreferences SET variable = 'ManualRenewalPeriodBase' WHERE variable = 'RenewalPeriodBase' >- } >- ); >- >- say_success( $out, "System preference RenewalPeriodBase updated to ManualRenewalPeriodBase" ); >+ if ($base_period) { >+ $dbh->do( >+ q{ >+ UPDATE systempreferences SET variable = 'ManualRenewalPeriodBase' WHERE variable = 'RenewalPeriodBase' >+ } >+ ); > >+ say_success( $out, "System preference RenewalPeriodBase updated to ManualRenewalPeriodBase" ); >+ } > $dbh->do( > q{ > INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) >-- >2.39.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 42046
: 195031