Bugzilla – Attachment 179165 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: Add missing NOT NULL clause in db rev
Bug-35635-Add-missing-NOT-NULL-clause-in-db-rev.patch (text/plain), 3.25 KB, created by
Jonathan Druart
on 2025-03-11 13:22:56 UTC
(
hide
)
Description:
Bug 35635: Add missing NOT NULL clause in db rev
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-03-11 13:22:56 UTC
Size:
3.25 KB
patch
obsolete
>From b1e97bd7592d93236a1754d48a790c3ee6505f6c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 11 Mar 2025 14:22:16 +0100 >Subject: [PATCH] Bug 35635: Add missing NOT NULL clause in db rev > >Jenkins job testing the update DB was failing: > >18:11:48 koha_1 | +++ b/Koha/Schema/Result/BorrowerAttributeType.pm >18:11:48 koha_1 | @@ -141,7 +141,7 @@ defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0 >18:11:48 koha_1 | >18:11:48 koha_1 | data_type: 'tinyint' >18:11:48 koha_1 | default_value: 0 >18:11:48 koha_1 | - is_nullable: 0 >18:11:48 koha_1 | + is_nullable: 1 >18:11:48 koha_1 | >18:11:48 koha_1 | defines if the attribute is mandatory or not in the staff interface >18:11:48 koha_1 | >18:11:48 koha_1 | @@ -149,7 +149,7 @@ defines if the attribute is mandatory or not in the staff interface >18:11:48 koha_1 | >18:11:48 koha_1 | data_type: 'tinyint' >18:11:48 koha_1 | default_value: 0 >18:11:48 koha_1 | - is_nullable: 0 >18:11:48 koha_1 | + is_nullable: 1 >18:11:48 koha_1 | >18:11:48 koha_1 | defines if the attribute is mandatory or not in the OPAC >18:11:48 koha_1 | >18:11:48 koha_1 | @@ -185,9 +185,9 @@ __PACKAGE__->add_columns( >18:11:48 koha_1 | "keep_for_pseudonymization", >18:11:48 koha_1 | { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >18:11:48 koha_1 | "mandatory", >18:11:48 koha_1 | - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >18:11:48 koha_1 | + { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >18:11:48 koha_1 | "opac_mandatory", >18:11:48 koha_1 | - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >18:11:49 koha_1 | + { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >--- > installer/data/mysql/db_revs/241200010.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/db_revs/241200010.pl b/installer/data/mysql/db_revs/241200010.pl >index 25b92446b0c..dd1463b12ee 100755 >--- a/installer/data/mysql/db_revs/241200010.pl >+++ b/installer/data/mysql/db_revs/241200010.pl >@@ -13,7 +13,7 @@ return { > $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' >+ MODIFY COLUMN `mandatory` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the staff interface' > } > ); > say_success( $out, "Modified column 'borrower_attribute_types.mandatory'" ); >@@ -21,7 +21,7 @@ return { > $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 in the OPAC' >+ ADD COLUMN `opac_mandatory` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the OPAC' > AFTER `mandatory` > } > ); >-- >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