Bugzilla – Attachment 177823 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: DO NOT PUSH - Schema updates
Bug-35635-DO-NOT-PUSH---Schema-updates.patch (text/plain), 7.21 KB, created by
Lucas Gass (lukeg)
on 2025-02-11 23:28:18 UTC
(
hide
)
Description:
Bug 35635: DO NOT PUSH - Schema updates
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-02-11 23:28:18 UTC
Size:
7.21 KB
patch
obsolete
>From 44c68c11fbb1d61e9f9d8cd01738c5d8c2df2ad0 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 11 Feb 2025 23:26:34 +0000 >Subject: [PATCH] Bug 35635: DO NOT PUSH - Schema updates > >--- > Koha/Schema.pm | 4 +- > Koha/Schema/Result/BorrowerAttributeType.pm | 121 +++++++++++--------- > 2 files changed, 68 insertions(+), 57 deletions(-) > >diff --git a/Koha/Schema.pm b/Koha/Schema.pm >index 874851a8315..f521f24f832 100644 >--- a/Koha/Schema.pm >+++ b/Koha/Schema.pm >@@ -12,8 +12,8 @@ use base 'DBIx::Class::Schema'; > > __PACKAGE__->load_namespaces; > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oDUxXckmfk6H9YCjW8PZTw >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-11 23:25:12 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tgpwyEspPvKljU0LssioNA > > # You can replace this text with custom content, and it will be preserved on regeneration > 1; >diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm >index 2759dece042..11eb2a00616 100644 >--- a/Koha/Schema/Result/BorrowerAttributeType.pm >+++ b/Koha/Schema/Result/BorrowerAttributeType.pm >@@ -1,4 +1,5 @@ > use utf8; >+ > package Koha::Schema::Result::BorrowerAttributeType; > > # Created by DBIx::Class::Schema::Loader >@@ -143,41 +144,51 @@ defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0 > default_value: 0 > is_nullable: 0 > >-defines if the attribute is mandatory or not >+defines if the attribute is mandatory or not in the staff interface >+ >+=head2 opac_mandatory >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+defines if the attribute is mandatory or not in the OPAC > > =cut > > __PACKAGE__->add_columns( >- "code", >- { data_type => "varchar", is_nullable => 0, size => 64 }, >- "description", >- { data_type => "varchar", is_nullable => 0, size => 255 }, >- "repeatable", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "unique_id", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "is_date", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "opac_display", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "opac_editable", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "staff_searchable", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "searched_by_default", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "authorised_value_category", >- { data_type => "varchar", is_nullable => 1, size => 32 }, >- "display_checkout", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "category_code", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >- "class", >- { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, >- "keep_for_pseudonymization", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "mandatory", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "code", >+ { data_type => "varchar", is_nullable => 0, size => 64 }, >+ "description", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "repeatable", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "unique_id", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "is_date", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "opac_display", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "opac_editable", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "staff_searchable", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "searched_by_default", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "authorised_value_category", >+ { data_type => "varchar", is_nullable => 1, size => 32 }, >+ "display_checkout", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "category_code", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "class", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, >+ "keep_for_pseudonymization", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "mandatory", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "opac_mandatory", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > ); > > =head1 PRIMARY KEY >@@ -203,10 +214,10 @@ Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch> > =cut > > __PACKAGE__->has_many( >- "borrower_attribute_types_branches", >- "Koha::Schema::Result::BorrowerAttributeTypesBranch", >- { "foreign.bat_code" => "self.code" }, >- { cascade_copy => 0, cascade_delete => 0 }, >+ "borrower_attribute_types_branches", >+ "Koha::Schema::Result::BorrowerAttributeTypesBranch", >+ { "foreign.bat_code" => "self.code" }, >+ { cascade_copy => 0, cascade_delete => 0 }, > ); > > =head2 borrower_attributes >@@ -218,10 +229,10 @@ Related object: L<Koha::Schema::Result::BorrowerAttribute> > =cut > > __PACKAGE__->has_many( >- "borrower_attributes", >- "Koha::Schema::Result::BorrowerAttribute", >- { "foreign.code" => "self.code" }, >- { cascade_copy => 0, cascade_delete => 0 }, >+ "borrower_attributes", >+ "Koha::Schema::Result::BorrowerAttribute", >+ { "foreign.code" => "self.code" }, >+ { cascade_copy => 0, cascade_delete => 0 }, > ); > > =head2 category_code >@@ -233,15 +244,15 @@ Related object: L<Koha::Schema::Result::Category> > =cut > > __PACKAGE__->belongs_to( >- "category_code", >- "Koha::Schema::Result::Category", >- { categorycode => "category_code" }, >- { >- is_deferrable => 1, >- join_type => "LEFT", >- on_delete => "RESTRICT", >- on_update => "RESTRICT", >- }, >+ "category_code", >+ "Koha::Schema::Result::Category", >+ { categorycode => "category_code" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "RESTRICT", >+ on_update => "RESTRICT", >+ }, > ); > > =head2 pseudonymized_borrower_attributes >@@ -253,15 +264,14 @@ Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute> > =cut > > __PACKAGE__->has_many( >- "pseudonymized_borrower_attributes", >- "Koha::Schema::Result::PseudonymizedBorrowerAttribute", >- { "foreign.code" => "self.code" }, >- { cascade_copy => 0, cascade_delete => 0 }, >+ "pseudonymized_borrower_attributes", >+ "Koha::Schema::Result::PseudonymizedBorrowerAttribute", >+ { "foreign.code" => "self.code" }, >+ { cascade_copy => 0, cascade_delete => 0 }, > ); > >- >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-10 14:00:56 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZmiiXHqRGV2SDb4IgSPvJQ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-11 23:25:12 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:56F+DYV67ONsOHz9MkM3DA > > __PACKAGE__->add_columns( > '+keep_for_pseudonymization' => { is_boolean => 1 }, >@@ -278,6 +288,7 @@ __PACKAGE__->add_columns( > sub koha_object_class { > 'Koha::Patron::Attribute::Type'; > } >+ > sub koha_objects_class { > 'Koha::Patron::Attribute::Types'; > } >-- >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