From 446c1faba6b2c5fbb9bd6766a53f0360fa05c6f3 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 5 Jun 2024 22:12:29 +0000 Subject: [PATCH] Bug 35635: DO NOT PUSH - Schema updates Signed-off-by: Brendan Lawlor Signed-off-by: Jonathan Druart --- Koha/Schema/Result/BorrowerAttributeType.pm | 109 ++++++++++---------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm index 0d8603cf53e..627cbb39b8a 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 @@ -156,38 +157,38 @@ defines if the attribute is mandatory or not on 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 }, - "opac_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 @@ -213,10 +214,10 @@ Related object: L =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 @@ -228,10 +229,10 @@ Related object: L =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 @@ -243,15 +244,15 @@ Related object: L =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 @@ -263,13 +264,12 @@ Related object: L =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 @@ -287,6 +287,7 @@ __PACKAGE__->add_columns( sub koha_object_class { 'Koha::Patron::Attribute::Type'; } + sub koha_objects_class { 'Koha::Patron::Attribute::Types'; } -- 2.39.5