From 1e95b5d4ef590f1e6da29d97326a20bcbb44b3d5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 23 Sep 2021 12:32:43 +0000 Subject: [PATCH] Bug 29093: {DO NOT PUSH] DBIx schema changes Note: Pending table changes in PQA. Signed-off-by: David Nind --- Koha/Schema/Result/ArticleRequest.pm | 62 +++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/Koha/Schema/Result/ArticleRequest.pm b/Koha/Schema/Result/ArticleRequest.pm index 8350a9f03b..9c27d42a43 100644 --- a/Koha/Schema/Result/ArticleRequest.pm +++ b/Koha/Schema/Result/ArticleRequest.pm @@ -97,8 +97,8 @@ __PACKAGE__->table("article_requests"); =head2 status data_type: 'enum' - default_value: 'PENDING' - extra: {list => ["PENDING","PROCESSING","COMPLETED","CANCELED"]} + default_value: 'REQUESTED' + extra: {list => ["REQUESTED","PENDING","PROCESSING","COMPLETED","CANCELED"]} is_nullable: 0 =head2 notes @@ -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 format data_type: 'enum' @@ -118,6 +126,14 @@ __PACKAGE__->table("article_requests"); data_type: 'mediumtext' is_nullable: 1 +=head2 cancellation_reason + + data_type: 'varchar' + is_nullable: 1 + size: 80 + +optional authorised value AR_CANCELLATION + =head2 created_on data_type: 'timestamp' @@ -133,6 +149,12 @@ Be careful with two timestamps in one table not allowing NULL default_value: current_timestamp is_nullable: 0 +=head2 toc_request + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + =cut __PACKAGE__->add_columns( @@ -165,12 +187,16 @@ __PACKAGE__->add_columns( "status", { data_type => "enum", - default_value => "PENDING", - extra => { list => ["PENDING", "PROCESSING", "COMPLETED", "CANCELED"] }, + default_value => "REQUESTED", + extra => { + list => ["REQUESTED", "PENDING", "PROCESSING", "COMPLETED", "CANCELED"], + }, is_nullable => 0, }, "notes", { data_type => "mediumtext", is_nullable => 1 }, + "debit_line_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "format", { data_type => "enum", @@ -180,6 +206,8 @@ __PACKAGE__->add_columns( }, "urls", { data_type => "mediumtext", is_nullable => 1 }, + "cancellation_reason", + { data_type => "varchar", is_nullable => 1, size => 80 }, "created_on", { data_type => "timestamp", @@ -193,6 +221,8 @@ __PACKAGE__->add_columns( default_value => \"current_timestamp", is_nullable => 0, }, + "toc_request", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); =head1 PRIMARY KEY @@ -259,6 +289,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 @@ -280,8 +330,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-12 13:41:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GVaBsoeXb0EiuKTJYkWLEg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-23 12:32:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MgIKxsOJtbpcT9ZT6iAShA # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.20.1