From 97a6a9537ed1f9741e3bd438d3482980a54933c8 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 2 Dec 2024 18:10:49 +0000 Subject: [PATCH] Bug 35635: (follow-up) Fix DBRev Signed-off-by: Jonathan Druart --- .../atomicupdate/bug_35635_add_opac_mandatory.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 ea1cf91637c..b8bdf969669 100755 --- a/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl +++ b/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl @@ -8,11 +8,20 @@ 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 client' + } + ); + + say $out "Modified column 'borrower_attribute_types.mandatory'"; + 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' + ADD COLUMN `opac_mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the OPAC' AFTER `mandatory` } ); -- 2.39.5