Bugzilla – Attachment 140707 Details for
Bug 29144
Move branches.opac_info to AdditionalContents allowing multi language
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29144: (QA follow-up) Make update idempotent
Bug-29144-QA-follow-up-Make-update-idempotent.patch (text/plain), 1.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-09-16 13:24:14 UTC
(
hide
)
Description:
Bug 29144: (QA follow-up) Make update idempotent
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-09-16 13:24:14 UTC
Size:
1.91 KB
patch
obsolete
>From fe9a0e3108dc6db02c3e0739b69b1bf656773901 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 16 Sep 2022 10:21:10 -0300 >Subject: [PATCH] Bug 29144: (QA follow-up) Make update idempotent > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../data/mysql/atomicupdate/bug_29144.pl | 24 +++++++++++-------- > 1 file changed, 14 insertions(+), 10 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_29144.pl b/installer/data/mysql/atomicupdate/bug_29144.pl >index 8d9ff107ba..0337bb51fe 100755 >--- a/installer/data/mysql/atomicupdate/bug_29144.pl >+++ b/installer/data/mysql/atomicupdate/bug_29144.pl >@@ -1,19 +1,23 @@ > use Modern::Perl; > > return { >- bug_number => 29144, >+ bug_number => 29144, > description => "Copy and remove branches.opac_info", > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; >- $dbh->do(q{ >-INSERT IGNORE INTO additional_contents ( category,code,location,branchcode,title,content,lang,published_on ) >-SELECT 'html_customizations', CONCAT('OpacLibraryInfo_', branches.branchcode), 'OpacLibraryInfo', branches.branchcode, branches.branchname, branches.opac_info, 'default', NOW() >-FROM branches >-WHERE branches.opac_info IS NOT NULL >- }); >- $dbh->do(q{ >-ALTER TABLE branches DROP COLUMN opac_info; >- }); >+ >+ if ( column_exists( 'branches', 'opac_info' ) ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO additional_contents ( category,code,location,branchcode,title,content,lang,published_on ) >+ SELECT 'html_customizations', CONCAT('OpacLibraryInfo_', branches.branchcode), 'OpacLibraryInfo', branches.branchcode, branches.branchname, branches.opac_info, 'default', NOW() >+ FROM branches >+ WHERE branches.opac_info IS NOT NULL >+ }); >+ >+ $dbh->do(q{ >+ ALTER TABLE branches DROP COLUMN opac_info; >+ }); >+ } > }, > }; >-- >2.34.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 29144
:
138473
|
138474
|
138527
|
138528
|
138599
|
138600
|
138601
|
138602
|
138603
|
138604
|
138605
|
138606
|
138607
|
138608
|
138609
|
139182
|
139183
|
139184
|
139185
|
139186
|
139187
|
139188
|
139189
|
139190
|
139191
|
139192
|
139197
|
139198
|
139199
|
139200
|
139201
|
139202
|
139203
|
139204
|
139205
|
139206
|
139207
|
139208
|
139366
|
139367
|
139368
|
139369
|
139370
|
139371
|
139372
|
139373
|
139374
|
139375
|
139376
|
139377
|
140020
|
140021
|
140022
|
140023
|
140024
|
140025
|
140026
|
140027
|
140028
|
140029
|
140030
| 140707