Bugzilla – Attachment 182246 Details for
Bug 35145
Add ability to order patron attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35145: (follow-up) Corrected pattern for adding a column
Bug-35145-follow-up-Corrected-pattern-for-adding-a.patch (text/plain), 1.83 KB, created by
David Nind
on 2025-05-11 22:41:47 UTC
(
hide
)
Description:
Bug 35145: (follow-up) Corrected pattern for adding a column
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-11 22:41:47 UTC
Size:
1.83 KB
patch
obsolete
>From 0b5c8a0aaaac204306947aee03f47f02f521335e Mon Sep 17 00:00:00 2001 >From: William Lavoie <william.lavoie@inLibro.com> >Date: Fri, 24 Jan 2025 10:22:08 -0500 >Subject: [PATCH] Bug 35145: (follow-up) Corrected pattern for adding a column > >Corrected the pattern to add a column in the update file. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../bug_35145_order_patron_attributes.pl | 19 ++++++++----------- > 1 file changed, 8 insertions(+), 11 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl b/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl >index 8dc108ffa1..cbadef817f 100755 >--- a/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl >+++ b/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl >@@ -7,17 +7,14 @@ return { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; > >- # Do you stuffs here >- $dbh->do( >- q{ >- ALTER TABLE borrower_attribute_types >- ADD COLUMN IF NOT EXISTS display_order INT(11) DEFAULT NULL COMMENT >- 'the order in which this attribute type appears in patron form' AFTER `mandatory` >+ # Do your stuff here >+ unless ( column_exists('borrower_attribute_types', 'display_order') ) { >+ $dbh->do(q{ >+ ALTER TABLE borrower_attribute_types >+ ADD COLUMN display_order INT(11) DEFAULT NULL COMMENT >+ 'the order in which this attribute type appears in patron form' AFTER `mandatory` >+ }); >+ say_success( $out, "Added column 'borrower_attribute_types.display_order'" ); > } >- ); >- >- # Print useful stuff here >- # tables >- say_success( $out, "Added column 'borrower_attribute_types.display_order'" ); > }, > }; >-- >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 35145
:
159182
|
159193
|
159344
|
159345
|
162347
|
162348
|
162619
|
162620
|
162621
|
162622
|
162676
|
166473
|
166519
|
166520
|
166521
|
169256
|
169257
|
169258
|
170330
|
170331
|
170332
|
170627
|
170628
|
170629
|
176756
|
176757
|
176758
|
176760
|
176761
|
176762
|
176763
|
176764
|
176765
|
177119
|
181885
|
181886
|
181887
|
181888
|
181889
|
181890
|
182241
|
182242
|
182243
|
182244
|
182245
| 182246