From c9a75bd30ca83803c66b28d4e9385e0b4c1643b6 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Thu, 22 Apr 2021 17:54:04 -0300 Subject: [PATCH] [DO NOT PUSH] Koha 27946: Update categories schema --- Koha/Schema/Result/Accountline.pm | 19 ++++++++++++++-- Koha/Schema/Result/ArticleRequest.pm | 34 ++++++++++++++++++++++++++-- Koha/Schema/Result/Category.pm | 14 ++++++++++-- 3 files changed, 61 insertions(+), 6 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 b1bf431329..d2d2dbaa78 100644 --- a/Koha/Schema/Result/ArticleRequest.pm +++ b/Koha/Schema/Result/ArticleRequest.pm @@ -106,6 +106,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' @@ -159,6 +167,8 @@ __PACKAGE__->add_columns( }, "notes", { data_type => "mediumtext", is_nullable => 1 }, + "debit_line_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "created_on", { data_type => "timestamp", @@ -238,6 +248,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 @@ -259,8 +289,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:5V0gW/nMkgDImbKMlIa2BA +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-04-23 21:05:05 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u0XEDG3oLT/MEcgokdf/Tw # You can replace this text with custom code or comments, and it will be preserved on regeneration 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.27.0