From b97d854fd3c2f10a1c1ce6ba675ce21c616df4ce 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 | 19 +++++++++++++++++-- Koha/Schema/Result/CirculationRule.pm | 8 ++++---- Koha/Schema/Result/Itemtype.pm | 15 +++++++++++++++ 4 files changed, 51 insertions(+), 6 deletions(-) diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index aea24e7382..2650cf3cb7 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -368,6 +368,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 fc26a7d496..6a973df05d 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 @@ -267,8 +282,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-08 13:37:33 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LH3DdDDYXaGsNsILAUZzng +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-06-28 04:08:15 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Bb9BvkU4r6/J8rD9z2sDrA # You can replace this text with custom content, and it will be preserved on regeneration 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 331db3ba77..09a10661c7 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