From b1e97bd7592d93236a1754d48a790c3ee6505f6c Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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