From 37912264b27369e0d7b24bfce9491dbfa3ad722f Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Thu, 22 Apr 2021 17:54:04 -0300 Subject: [PATCH] Bug 27946: [DO NOT PUSH] Update DBIx schema --- Koha/Schema/Result/Accountline.pm | 19 ++++++++++++++++-- Koha/Schema/Result/ArticleRequest.pm | 30 ++++++++++++++++++++++++++++ Koha/Schema/Result/Category.pm | 14 +++++++++++-- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm index 47edfcf4e4..a2f1071a29 100644 --- a/Koha/Schema/Result/Accountline.pm +++ b/Koha/Schema/Result/Accountline.pm @@ -240,6 +240,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 article_requests + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "article_requests", + "Koha::Schema::Result::ArticleRequest", + { "foreign.debit_line_id" => "self.accountlines_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 borrowernumber Type: belongs_to @@ -381,8 +396,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MBdnk+5gD5TMX/ZOqEf3kA +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-04-23 21:05:05 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:210iHqtM3+0JQ3PG+FY1Kw =head2 library diff --git a/Koha/Schema/Result/ArticleRequest.pm b/Koha/Schema/Result/ArticleRequest.pm index 8350a9f03b..895dcbbbd2 100644 --- a/Koha/Schema/Result/ArticleRequest.pm +++ b/Koha/Schema/Result/ArticleRequest.pm @@ -118,6 +118,14 @@ __PACKAGE__->table("article_requests"); data_type: 'mediumtext' is_nullable: 1 +=head2 debit_line_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +Debit line with cost for article scan request + =head2 created_on data_type: 'timestamp' @@ -180,6 +188,8 @@ __PACKAGE__->add_columns( }, "urls", { data_type => "mediumtext", is_nullable => 1 }, + "debit_line_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "created_on", { data_type => "timestamp", @@ -259,6 +269,26 @@ __PACKAGE__->belongs_to( }, ); +=head2 debit_line + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "debit_line", + "Koha::Schema::Result::Accountline", + { accountlines_id => "debit_line_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "CASCADE", + }, +); + =head2 itemnumber Type: belongs_to diff --git a/Koha/Schema/Result/Category.pm b/Koha/Schema/Result/Category.pm index 9cd2dc71ae..3402bd8dba 100644 --- a/Koha/Schema/Result/Category.pm +++ b/Koha/Schema/Result/Category.pm @@ -190,6 +190,14 @@ set required password strength for patrons in this category Exclude patrons of this category from local holds priority +=head2 article_request_fee + + data_type: 'decimal' + is_nullable: 1 + size: [28,6] + +Cost for article scan request + =cut __PACKAGE__->add_columns( @@ -252,6 +260,8 @@ __PACKAGE__->add_columns( { data_type => "tinyint", is_nullable => 1 }, "exclude_from_local_holds_priority", { data_type => "tinyint", is_nullable => 1 }, + "article_request_fee", + { data_type => "decimal", is_nullable => 1, size => [28, 6] }, ); =head1 PRIMARY KEY @@ -344,8 +354,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O4duiIu9dHKr31ToxFGubA +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-04-22 20:47:52 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S8G1yCMi9bYJXgM2KhffgQ __PACKAGE__->add_columns( '+exclude_from_local_holds_priority' => { is_boolean => 1 }, -- 2.25.1