Bugzilla – Attachment 177119 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.79 KB, created by
William Lavoie
on 2025-01-24 15:29:18 UTC
(
hide
)
Description:
Bug 35145: (follow-up) Corrected pattern for adding a column
Filename:
MIME Type:
Creator:
William Lavoie
Created:
2025-01-24 15:29:18 UTC
Size:
1.79 KB
patch
obsolete
>From dfa15b25a9cba7daf5460bcdc0f374d9ac331332 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. >--- > .../bug_35145_order_patron_attributes.pl | 21 ++++++++----------- > 1 file changed, 9 insertions(+), 12 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..091cd4ab0c 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.43.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 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