From 7b777907d5c5d0b32dbc4d2e63301ac3965a748a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 28 Jun 2017 04:08:55 -0400 Subject: [PATCH] Bug 18887 - Update existing schema files --- Koha/Schema/Result/Branch.pm | 15 +++++++++++++++ Koha/Schema/Result/Category.pm | 15 +++++++++++++++ Koha/Schema/Result/CirculationRule.pm | 8 ++++---- Koha/Schema/Result/Itemtype.pm | 15 +++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index bb571b18de..649ac9c43a 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -353,6 +353,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 circulation_rules + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "circulation_rules", + "Koha::Schema::Result::CirculationRule", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 club_enrollments Type: has_many diff --git a/Koha/Schema/Result/Category.pm b/Koha/Schema/Result/Category.pm index 42865a8239..48e8359a1a 100644 --- a/Koha/Schema/Result/Category.pm +++ b/Koha/Schema/Result/Category.pm @@ -251,6 +251,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 circulation_rules + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "circulation_rules", + "Koha::Schema::Result::CirculationRule", + { "foreign.categorycode" => "self.categorycode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 default_borrower_circ_rule Type: might_have diff --git a/Koha/Schema/Result/CirculationRule.pm b/Koha/Schema/Result/CirculationRule.pm index 9c950cdb5f..6e7141f740 100644 --- a/Koha/Schema/Result/CirculationRule.pm +++ b/Koha/Schema/Result/CirculationRule.pm @@ -135,13 +135,13 @@ __PACKAGE__->belongs_to( Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( "categorycode", - "Koha::Schema::Result::Branchcategory", + "Koha::Schema::Result::Category", { categorycode => "categorycode" }, { is_deferrable => 1, @@ -172,8 +172,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-06 17:39:41 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SZuAUJSu+FICBAxyxIcJQA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-06-28 04:08:15 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cp5jbv46L3LtPVxSla8dpA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index 0e36247b50..95ff7af580 100644 --- a/Koha/Schema/Result/Itemtype.pm +++ b/Koha/Schema/Result/Itemtype.pm @@ -165,6 +165,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 circulation_rules + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "circulation_rules", + "Koha::Schema::Result::CirculationRule", + { "foreign.itemtype" => "self.itemtype" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 default_branch_item_rule Type: might_have -- 2.15.1