From fdf9fcfee433bf9a34fddb4063e739a39b14e241 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 10 Feb 2026 17:40:01 +0000 Subject: [PATCH] Bug 28530: DBIC Signed-off-by: Lucas Gass --- Koha/Schema/Result/Branch.pm | 19 +++++++++++-- Koha/Schema/Result/Branchtransfer.pm | 7 ++--- Koha/Schema/Result/Itemtype.pm | 19 +++++++++++-- Koha/Schema/Result/LibraryFloatLimit.pm | 36 ++++++++++++------------- 4 files changed, 56 insertions(+), 25 deletions(-) diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index 787c077219..0ac29d99ab 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -800,6 +800,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 library_float_limits + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "library_float_limits", + "Koha::Schema::Result::LibraryFloatLimit", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 library_groups Type: has_many @@ -996,8 +1011,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-03 13:13:25 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HiH1QNlDqKcq9GeM85Pu0A +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-10 17:39:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qVz4KJbAEtT4XDNdAxWc7w __PACKAGE__->has_many( "additional_field_values", diff --git a/Koha/Schema/Result/Branchtransfer.pm b/Koha/Schema/Result/Branchtransfer.pm index 53abfdbe6b..26f2068ee1 100644 --- a/Koha/Schema/Result/Branchtransfer.pm +++ b/Koha/Schema/Result/Branchtransfer.pm @@ -103,7 +103,7 @@ any comments related to the transfer =head2 reason data_type: 'enum' - extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","TransferCancellation","Recall","RecallCancellation"]} + extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","TransferCancellation","Recall","RecallCancellation","LibraryFloatLimit"]} is_nullable: 1 what triggered the transfer @@ -188,6 +188,7 @@ __PACKAGE__->add_columns( "TransferCancellation", "Recall", "RecallCancellation", + "LibraryFloatLimit", ], }, is_nullable => 1, @@ -275,8 +276,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-03 16:48:17 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BkhtfptiDqKKSv/hmCQy3w +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-10 17:39:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nlmBm/HwBA6PQGLdDGRI8A =head2 koha_object_class diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index 3d3c97ccb4..88c3e403ca 100644 --- a/Koha/Schema/Result/Itemtype.pm +++ b/Koha/Schema/Result/Itemtype.pm @@ -309,6 +309,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 library_float_limits + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "library_float_limits", + "Koha::Schema::Result::LibraryFloatLimit", + { "foreign.itemtype" => "self.itemtype" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 old_reserves Type: has_many @@ -360,8 +375,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-08-20 19:06:37 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T/3QdCb353e+qBkN4as7Bg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-10 17:39:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jdGLBem2+Cj1STCmWCf2Bg __PACKAGE__->add_columns( '+automatic_checkin' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/LibraryFloatLimit.pm b/Koha/Schema/Result/LibraryFloatLimit.pm index 739ec290aa..7cb8e98033 100644 --- a/Koha/Schema/Result/LibraryFloatLimit.pm +++ b/Koha/Schema/Result/LibraryFloatLimit.pm @@ -1,5 +1,4 @@ use utf8; - package Koha::Schema::Result::LibraryFloatLimit; # Created by DBIx::Class::Schema::Loader @@ -46,12 +45,12 @@ __PACKAGE__->table("library_float_limits"); =cut __PACKAGE__->add_columns( - "branchcode", - { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, - "itemtype", - { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, - "float_limit", - { data_type => "integer", is_nullable => 1 }, + "branchcode", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, + "itemtype", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, + "float_limit", + { data_type => "integer", is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -66,7 +65,7 @@ __PACKAGE__->add_columns( =cut -__PACKAGE__->set_primary_key( "branchcode", "itemtype" ); +__PACKAGE__->set_primary_key("branchcode", "itemtype"); =head1 RELATIONS @@ -79,10 +78,10 @@ Related object: L =cut __PACKAGE__->belongs_to( - "branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "branchcode" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 itemtype @@ -94,14 +93,15 @@ Related object: L =cut __PACKAGE__->belongs_to( - "itemtype", - "Koha::Schema::Result::Itemtype", - { itemtype => "itemtype" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, + "itemtype", + "Koha::Schema::Result::Itemtype", + { itemtype => "itemtype" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-19 18:47:35 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AnpZIyNq9oO1vmDSXmQEMQ + +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-02-10 17:39:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k3cunGcwURNA1Hv/HY8+oQ =head2 koha_object_class