From 93277bad866eadebc75bdfe250886a788ee84bf4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 26 Sep 2022 16:31:59 +0000 Subject: [PATCH] Bug 31626: Update Schema Files [DO NOT PUSH] Signed-off-by: Andrew Fuerste-Henry --- Koha/Schema/Result/Letter.pm | 19 ++++++++++++++++-- Koha/Schema/Result/MessageQueue.pm | 32 ++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/Koha/Schema/Result/Letter.pm b/Koha/Schema/Result/Letter.pm index 613c4d9b27..f0f9659a4e 100644 --- a/Koha/Schema/Result/Letter.pm +++ b/Koha/Schema/Result/Letter.pm @@ -201,6 +201,21 @@ __PACKAGE__->add_unique_constraint( =head1 RELATIONS +=head2 message_queues + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "message_queues", + "Koha::Schema::Result::MessageQueue", + { "foreign.letter_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 message_transport_type Type: belongs_to @@ -217,8 +232,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-11 12:33:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qqdTVEicMu5rHppY5qsEuA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-26 16:03:55 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sDvzoretV6pgwNN1G6BzcA sub koha_object_class { 'Koha::Notice::Template'; diff --git a/Koha/Schema/Result/MessageQueue.pm b/Koha/Schema/Result/MessageQueue.pm index 810064a1b0..e7571bc961 100644 --- a/Koha/Schema/Result/MessageQueue.pm +++ b/Koha/Schema/Result/MessageQueue.pm @@ -29,6 +29,12 @@ __PACKAGE__->table("message_queue"); is_auto_increment: 1 is_nullable: 0 +=head2 letter_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + =head2 borrowernumber data_type: 'integer' @@ -113,6 +119,8 @@ __PACKAGE__->table("message_queue"); __PACKAGE__->add_columns( "message_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "letter_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "subject", @@ -191,6 +199,26 @@ __PACKAGE__->belongs_to( }, ); +=head2 letter + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "letter", + "Koha::Schema::Result::Letter", + { id => "letter_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "CASCADE", + }, +); + =head2 message_transport_type Type: belongs_to @@ -207,8 +235,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-05 08:57:36 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NwbN8wPMAlucrw6iQ2XQ5g +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-26 16:03:55 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cnZ/YPx4BDhg2RLg0h65PA sub koha_object_class { 'Koha::Notice::Message'; -- 2.30.2