From 13763003a279c8eda15124a6b7c7c92ac6c94e23 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Mar 2020 13:05:19 +0100 Subject: [PATCH] Bug 23590: DBIC Changes Signed-off-by: Katrin Fischer --- Koha/Schema/Result/Borrower.pm | 19 +++++++++++++++++-- Koha/Schema/Result/Suggestion.pm | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index b2ef6c90ed..92a91b2b91 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -1482,6 +1482,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 suggestions_lastmodificationbies + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "suggestions_lastmodificationbies", + "Koha::Schema::Result::Suggestion", + { "foreign.lastmodificationby" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 suggestions_managedbies Type: has_many @@ -1658,8 +1673,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-24 11:25:33 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6G2Szd+G4io5YH4nsxr2eg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-24 12:04:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc2beHgnH2egLaVzXEcLPg __PACKAGE__->add_columns( '+anonymized' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm index 1668744771..87a14c2ae4 100644 --- a/Koha/Schema/Result/Suggestion.pm +++ b/Koha/Schema/Result/Suggestion.pm @@ -77,6 +77,18 @@ __PACKAGE__->table("suggestions"); datetime_undef_if_invalid: 1 is_nullable: 1 +=head2 lastmodificationby + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +=head2 lastmodificationdate + + data_type: 'date' + datetime_undef_if_invalid: 1 + is_nullable: 1 + =head2 STATUS accessor: 'status' @@ -228,6 +240,10 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "rejecteddate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "lastmodificationby", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "lastmodificationdate", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "STATUS", { accessor => "status", @@ -379,6 +395,26 @@ __PACKAGE__->belongs_to( }, ); +=head2 lastmodificationby + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "lastmodificationby", + "Koha::Schema::Result::Borrower", + { borrowernumber => "lastmodificationby" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "CASCADE", + }, +); + =head2 managedby Type: belongs_to @@ -440,8 +476,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UsG/gxLa0HMMbcpbscV29Q +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-24 12:04:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2j+YaHKq7Jq1ku10CGlynA __PACKAGE__->belongs_to( "suggester", -- 2.11.0