From 5aeccc29f0f15a24e28f2688de5988c27668b964 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 13 May 2019 20:08:34 +0000 Subject: [PATCH] Bug 22899: [DO NOT PUSH] Schema updates --- Koha/Schema/Result/Item.pm | 19 +++++++++++++++++-- Koha/Schema/Result/TmpHoldsqueue.pm | 29 ++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 106ebd2edb..a39b41b57e 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -701,9 +701,24 @@ __PACKAGE__->might_have( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 tmp_holdsqueues -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-09 15:50:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PQvA8qoxvTe4In5/oa5WIQ +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "tmp_holdsqueues", + "Koha::Schema::Result::TmpHoldsqueue", + { "foreign.itemnumber" => "self.itemnumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-13 19:45:19 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VwC+zRYfSwpcakDpCkBXkA __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/TmpHoldsqueue.pm b/Koha/Schema/Result/TmpHoldsqueue.pm index 6a8c76e4d6..86aab40103 100644 --- a/Koha/Schema/Result/TmpHoldsqueue.pm +++ b/Koha/Schema/Result/TmpHoldsqueue.pm @@ -31,6 +31,7 @@ __PACKAGE__->table("tmp_holdsqueue"); =head2 itemnumber data_type: 'integer' + is_foreign_key: 1 is_nullable: 1 =head2 barcode @@ -111,7 +112,7 @@ __PACKAGE__->add_columns( "biblionumber", { data_type => "integer", is_nullable => 1 }, "itemnumber", - { data_type => "integer", is_nullable => 1 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "barcode", { data_type => "varchar", is_nullable => 1, size => 20 }, "surname", @@ -140,9 +141,31 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); +=head1 RELATIONS + +=head2 itemnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "itemnumber", + "Koha::Schema::Result::Item", + { itemnumber => "itemnumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1Wa4h3u3FePOhGPD8SHEWg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-13 19:45:19 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7btKvJE/ZvkG5IvPF3vHeQ # You can replace this text with custom content, and it will be preserved on regeneration -- 2.11.0