From 5dc81d64c62dd1b490792df39229f416b98db84c Mon Sep 17 00:00:00 2001 From: Nicolas Legrand Date: Mon, 14 Sep 2020 18:53:45 +0200 Subject: [PATCH] Bug 24412: Schema file DO NOT PUSH! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Renvoize Signed-off-by: Séverine QUEUNE --- Koha/Schema/Result/Desk.pm | 19 +++++++++++++++++-- Koha/Schema/Result/OldReserve.pm | 11 +++++++++-- Koha/Schema/Result/Reserve.pm | 32 ++++++++++++++++++++++++++++++-- 3 files changed, 56 insertions(+), 6 deletions(-) diff --git a/Koha/Schema/Result/Desk.pm b/Koha/Schema/Result/Desk.pm index a72be1b..5f4af8c 100644 --- a/Koha/Schema/Result/Desk.pm +++ b/Koha/Schema/Result/Desk.pm @@ -83,9 +83,24 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 reserves -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-10-02 13:43:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IklOycKlChqv9Tftm8rjqA +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "reserves", + "Koha::Schema::Result::Reserve", + { "foreign.desk_id" => "self.desk_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-09-14 18:41:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hc4PhUNsnk6tkmh0oI790w # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm index 2cc0e2f..5b48420 100644 --- a/Koha/Schema/Result/OldReserve.pm +++ b/Koha/Schema/Result/OldReserve.pm @@ -52,6 +52,11 @@ __PACKAGE__->table("old_reserves"); is_nullable: 1 size: 10 +=head2 desk_id + + data_type: 'integer' + is_nullable: 1 + =head2 notificationdate data_type: 'date' @@ -169,6 +174,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "branchcode", { data_type => "varchar", is_nullable => 1, size => 10 }, + "desk_id", + { data_type => "integer", is_nullable => 1 }, "notificationdate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reminderdate", @@ -314,8 +321,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-31 14:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DnOerXRIsIGIRKl9I0HZUQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-09-14 18:41:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:27y0XaLBE4Jgf2sDxKdBIA __PACKAGE__->add_columns( '+item_level_hold' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm index 2d7b397..bd3b510 100644 --- a/Koha/Schema/Result/Reserve.pm +++ b/Koha/Schema/Result/Reserve.pm @@ -56,6 +56,12 @@ __PACKAGE__->table("reserves"); is_nullable: 1 size: 10 +=head2 desk_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + =head2 notificationdate data_type: 'date' @@ -183,6 +189,8 @@ __PACKAGE__->add_columns( }, "branchcode", { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + "desk_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "notificationdate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reminderdate", @@ -312,6 +320,26 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 desk + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "desk", + "Koha::Schema::Result::Desk", + { desk_id => "desk_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + =head2 itemnumber Type: belongs_to @@ -353,8 +381,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-31 14:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:goRy3ZQWpGNmicok5Av37Q +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-09-14 18:41:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cFrUf7wFugFlTAOApDihFA __PACKAGE__->belongs_to( "item", -- 2.1.4