Bugzilla – Attachment 176604 Details for
Bug 35635
Expand patron attribute type mandatory field to allow different settings for OPAC and staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35635: Adjust atomic update
Bug-35635-Adjust-atomic-update.patch (text/plain), 1.98 KB, created by
Jonathan Druart
on 2025-01-16 09:45:19 UTC
(
hide
)
Description:
Bug 35635: Adjust atomic update
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-16 09:45:19 UTC
Size:
1.98 KB
patch
obsolete
>From a01ba5e0ed197b5f1a3c6c562498a46d8c545906 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 16 Jan 2025 10:44:39 +0100 >Subject: [PATCH] Bug 35635: Adjust atomic update > >So that we don't do anything if the new column exists already. >--- > .../bug_35635_add_opac_mandatory.pl | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl b/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl >index 1ea7bb77711..e871621bcd7 100755 >--- a/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl >+++ b/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl >@@ -8,16 +8,16 @@ return { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; > >- $dbh->do( >- q{ >- ALTER TABLE borrower_attribute_types >- MODIFY COLUMN `mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the staff interface' >- } >- ); >+ if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) { > >- say $out "Modified column 'borrower_attribute_types.mandatory'"; >+ $dbh->do( >+ q{ >+ ALTER TABLE borrower_attribute_types >+ MODIFY COLUMN `mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the staff interface' >+ } >+ ); >+ say $out "Modified column 'borrower_attribute_types.mandatory'"; > >- if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) { > $dbh->do( > q{ > ALTER TABLE borrower_attribute_types >@@ -25,7 +25,6 @@ return { > AFTER `mandatory` > } > ); >- > say $out "Added column 'borrower_attribute_types.opac_mandatory'"; > > $dbh->do(q{ >-- >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 35635
:
167500
|
167501
|
167502
|
167546
|
167548
|
167643
|
167644
|
167645
|
167646
|
174962
|
175059
|
175635
|
175858
|
176595
|
176596
|
176597
|
176598
|
176599
|
176600
|
176601
|
176602
|
176603
|
176604
|
177803
|
177804
|
177805
|
177806
|
177807
|
177808
|
177809
|
177810
|
177811
|
177812
|
177814
|
177815
|
177816
|
177817
|
177818
|
177819
|
177820
|
177821
|
177822
|
177823
|
179165