From 5ee3b6bbb2f8611b869494e0723918f6bf0bead8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 Oct 2020 11:26:51 +0200 Subject: [PATCH] Bug 26145: DBIC schema changes Signed-off-by: Jonathan Druart --- Koha/Schema/Result/Biblio.pm | 32 ++++++++++++++++---------------- Koha/Schema/Result/Item.pm | 19 +++++++++++++++++-- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 806faf87ad..fa3979886f 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -210,48 +210,48 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 biblioimages +=head2 biblioitems Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "biblioimages", - "Koha::Schema::Result::Biblioimage", + "biblioitems", + "Koha::Schema::Result::Biblioitem", { "foreign.biblionumber" => "self.biblionumber" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 biblioitems +=head2 club_holds Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "biblioitems", - "Koha::Schema::Result::Biblioitem", - { "foreign.biblionumber" => "self.biblionumber" }, + "club_holds", + "Koha::Schema::Result::ClubHold", + { "foreign.biblio_id" => "self.biblionumber" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 club_holds +=head2 cover_images Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "club_holds", - "Koha::Schema::Result::ClubHold", - { "foreign.biblio_id" => "self.biblionumber" }, + "cover_images", + "Koha::Schema::Result::CoverImage", + { "foreign.biblionumber" => "self.biblionumber" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -451,8 +451,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p2SIq565zPyE3ZUkSuXyBA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-10-12 09:13:32 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R4PNOXHa9cRIx/up7HWz4Q __PACKAGE__->has_one( diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index ac5fbe5fa0..cd22433ad2 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -541,6 +541,21 @@ __PACKAGE__->might_have( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 cover_images + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "cover_images", + "Koha::Schema::Result::CoverImage", + { "foreign.itemnumber" => "self.itemnumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 creator_batches Type: has_many @@ -747,8 +762,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-09-30 15:31:01 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GJJ00YUn85GnJ98wpqNaLg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-10-12 09:13:32 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pmAVO6LxCb6wAJvfh+rndw __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); -- 2.39.5