From 93f0556e1db1d609fa006299d24febe0c45793af Mon Sep 17 00:00:00 2001
From: David Gustafsson <david.gustafsson@ub.gu.se>
Date: Tue, 25 Mar 2025 21:44:14 +0100
Subject: [PATCH] Bug 39453: Schema changes

---
 Koha/Schema/Result/BorrowerAttributeType.pm | 39 ++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm
index a83ac83262d..f780d260bd7 100644
--- a/Koha/Schema/Result/BorrowerAttributeType.pm
+++ b/Koha/Schema/Result/BorrowerAttributeType.pm
@@ -155,6 +155,37 @@ defines if the attribute is mandatory or not in the OPAC
 
 =cut
 
+=head2 hidden
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
+defines if the attribute is hidden or not
+
+=cut
+
+=head2 readonly
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
+defines if the attribute is readonly or not
+
+=cut
+
+=head2 secret
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
+defines if the attribute is secret or not
+
+=cut
+
+
 __PACKAGE__->add_columns(
   "code",
   { data_type => "varchar", is_nullable => 0, size => 64 },
@@ -188,6 +219,12 @@ __PACKAGE__->add_columns(
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "opac_mandatory",
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "hidden",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "readonly",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "secret",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
 );
 
 =head1 PRIMARY KEY
@@ -276,7 +313,7 @@ __PACKAGE__->has_many(
 __PACKAGE__->add_columns(
     '+keep_for_pseudonymization' => { is_boolean => 1 },
     '+mandatory'                 => { is_boolean => 1 },
-    '+opac_mandatory'            => { is_boolean => 1 },
+'+opac_mandatory'            => { is_boolean => 1 },
     '+searched_by_default'       => { is_boolean => 1 },
     '+staff_searchable'          => { is_boolean => 1 },
 );
-- 
2.49.0