Bugzilla – Attachment 177814 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: DB Updates
Bug-35635-DB-Updates.patch (text/plain), 2.42 KB, created by
Lucas Gass (lukeg)
on 2025-02-11 23:27:54 UTC
(
hide
)
Description:
Bug 35635: DB Updates
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-02-11 23:27:54 UTC
Size:
2.42 KB
patch
obsolete
>From 2fb3a18e3cd9a85042241b903f2b6cfbb20fa1fc Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 5 Jun 2024 22:10:34 +0000 >Subject: [PATCH] Bug 35635: DB Updates > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../bug_35635_add_opac_mandatory.pl | 32 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 33 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl b/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl >new file mode 100755 >index 00000000000..ea1cf91637c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl >@@ -0,0 +1,32 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "35635", >+ description => "Add opac_mandatory column to borrower_attribute_type table", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE borrower_attribute_types >+ ADD COLUMN `opac_mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not on the OPAC' >+ AFTER `mandatory` >+ } >+ ); >+ >+ say $out "Added column 'borrower_attribute_types.opac_mandatory'"; >+ >+ $dbh->do( >+ q{ >+ UPDATE borrower_attribute_types >+ SET opac_mandatory = 1 WHERE mandatory = 1; >+ } >+ ); >+ say $out "Update opac_mandatory to match mandatory column"; >+ } >+ }, >+ >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3bf15c1007d..684fe271973 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -6755,4 +6755,4 @@ CREATE TABLE `zebraqueue` ( > /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; > /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; > >--- Dump completed on 2024-11-25 12:13:27 >+-- Dump completed on 2024-11-25 12:13:27 >\ No newline at end of file >-- >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 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