From 0e35ab911c631dbac4be1018de57ebdec059b754 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 14 Mar 2022 20:54:20 -1000 Subject: [PATCH] Bug 19532: (RM follow-up) Update DBIC Schema Signed-off-by: Fridolin Somers --- Koha/Schema/Result/Borrower.pm | 4 ++-- Koha/Schema/Result/Branchtransfer.pm | 13 ++++++++---- Koha/Schema/Result/Recall.pm | 31 ++++++++++++++++++++++------ 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index 0cc33e2200..d2b5c6015f 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -1930,8 +1930,8 @@ Composing rels: L -> permission __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-25 00:33:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qPGKczsaKaLxxiNzZS5zdQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-15 06:51:43 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozDOfb67H7/GHLI0o4DdyA __PACKAGE__->has_many( "extended_attributes", diff --git a/Koha/Schema/Result/Branchtransfer.pm b/Koha/Schema/Result/Branchtransfer.pm index 6f51ce7c82..365afd06d0 100644 --- a/Koha/Schema/Result/Branchtransfer.pm +++ b/Koha/Schema/Result/Branchtransfer.pm @@ -103,13 +103,15 @@ any comments related to the transfer =head2 reason data_type: 'enum' - extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","Recall","CancelRecall"]} + extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","TransferCancellation","Recall","CancelRecall"]} is_nullable: 1 +what triggered the transfer + =head2 cancellation_reason data_type: 'enum' - extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","ItemLost","WrongTransfer"]} + extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","ItemLost","WrongTransfer","Recall","CancelRecall"]} is_nullable: 1 what triggered the transfer cancellation @@ -183,6 +185,7 @@ __PACKAGE__->add_columns( "Reserve", "LostReserve", "CancelReserve", + "TransferCancellation", "Recall", "CancelRecall", ], @@ -205,6 +208,8 @@ __PACKAGE__->add_columns( "CancelReserve", "ItemLost", "WrongTransfer", + "Recall", + "CancelRecall", ], }, is_nullable => 1, @@ -271,8 +276,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:APOPxPO4uRpPHgSEhXbnTw +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-15 06:51:43 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PRXo3jKKZT7MhzT1EbqpWg sub koha_object_class { 'Koha::Item::Transfer'; diff --git a/Koha/Schema/Result/Recall.pm b/Koha/Schema/Result/Recall.pm index 3918157da2..0b53e38299 100644 --- a/Koha/Schema/Result/Recall.pm +++ b/Koha/Schema/Result/Recall.pm @@ -74,9 +74,12 @@ __PACKAGE__->table("recalls"); =head2 status - data_type: 'varchar' + data_type: 'enum' + default_value: 'requested' + extra: {list => ["requested","overdue","waiting","in_transit","cancelled","expired","fulfilled"]} is_nullable: 1 - size: 1 + +Request status =head2 timestamp @@ -106,6 +109,7 @@ __PACKAGE__->table("recalls"); =head2 old data_type: 'tinyint' + default_value: 0 is_nullable: 1 =head2 item_level_recall @@ -152,7 +156,22 @@ __PACKAGE__->add_columns( "priority", { data_type => "smallint", is_nullable => 1 }, "status", - { data_type => "varchar", is_nullable => 1, size => 1 }, + { + data_type => "enum", + default_value => "requested", + extra => { + list => [ + "requested", + "overdue", + "waiting", + "in_transit", + "cancelled", + "expired", + "fulfilled", + ], + }, + is_nullable => 1, + }, "timestamp", { data_type => "timestamp", @@ -175,7 +194,7 @@ __PACKAGE__->add_columns( is_nullable => 1, }, "old", - { data_type => "tinyint", is_nullable => 1 }, + { data_type => "tinyint", default_value => 0, is_nullable => 1 }, "item_level_recall", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); @@ -265,8 +284,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3OJBkRJzqxZpuRp0GYGixw +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-15 06:51:43 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nG6sAMWzjgfD+r6aUsITzA __PACKAGE__->add_columns( '+old' => { is_boolean => 1 }, -- 2.20.1