From 7f793363b81d2f49ed196360723000c35895d5b9 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 19 Aug 2022 14:59:49 -0300 Subject: [PATCH] Bug 23681: (QA follow-up) New schema files Signed-off-by: Tomas Cohen Arazi --- Koha/RestrictionType.pm | 6 +++--- Koha/RestrictionTypes.pm | 8 ++------ Koha/Schema/Result/BorrowerDebarment.pm | 10 +++++----- .../Result/{DebarmentType.pm => RestrictionType.pm} | 12 ++++++------ 4 files changed, 16 insertions(+), 20 deletions(-) rename Koha/Schema/Result/{DebarmentType.pm => RestrictionType.pm} (82%) diff --git a/Koha/RestrictionType.pm b/Koha/RestrictionType.pm index d6f6690369..a86a1d0564 100644 --- a/Koha/RestrictionType.pm +++ b/Koha/RestrictionType.pm @@ -28,7 +28,7 @@ Koha::RestrictionType - Koha RestrictionType Object class =head1 API -=head2 Class Methods +=head2 Class methods =head3 delete @@ -87,12 +87,12 @@ sub make_default { =head2 Internal methods -=head3 type +=head3 _type =cut sub _type { - return 'DebarmentType'; + return 'RestrictionType'; } 1; diff --git a/Koha/RestrictionTypes.pm b/Koha/RestrictionTypes.pm index 60ca1e252c..aa783bd104 100644 --- a/Koha/RestrictionTypes.pm +++ b/Koha/RestrictionTypes.pm @@ -17,10 +17,6 @@ package Koha::RestrictionTypes; use Modern::Perl; -use Carp; - -use C4::Context; - use Koha::Database; use Koha::RestrictionType; @@ -32,7 +28,7 @@ Koha::RestrictionTypes - Koha Restriction Types Object set class =head1 API -=head2 Class Methods +=head2 Class methods =cut @@ -59,7 +55,7 @@ sub keyed_on_code { =cut sub _type { - return 'DebarmentType'; + return 'RestrictionType'; } =head3 object_class diff --git a/Koha/Schema/Result/BorrowerDebarment.pm b/Koha/Schema/Result/BorrowerDebarment.pm index 7c27d56d30..9c025284e5 100644 --- a/Koha/Schema/Result/BorrowerDebarment.pm +++ b/Koha/Schema/Result/BorrowerDebarment.pm @@ -54,7 +54,7 @@ expiration date of the restriction is_nullable: 0 size: 50 -type of restriction, FK to debarment_types.code +type of restriction, FK to restriction_types.code =head2 comment @@ -150,20 +150,20 @@ __PACKAGE__->belongs_to( Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( "type", - "Koha::Schema::Result::DebarmentType", + "Koha::Schema::Result::RestrictionType", { code => "type" }, { is_deferrable => 1, on_delete => "NO ACTION", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-04 11:05:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bxRDwUTv9cZVpDfNDatosQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kDCkA7XrjKXlrFG5lk8Lgg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DebarmentType.pm b/Koha/Schema/Result/RestrictionType.pm similarity index 82% rename from Koha/Schema/Result/DebarmentType.pm rename to Koha/Schema/Result/RestrictionType.pm index 9c15cdc051..5131979ae4 100644 --- a/Koha/Schema/Result/DebarmentType.pm +++ b/Koha/Schema/Result/RestrictionType.pm @@ -1,12 +1,12 @@ use utf8; -package Koha::Schema::Result::DebarmentType; +package Koha::Schema::Result::RestrictionType; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE =head1 NAME -Koha::Schema::Result::DebarmentType +Koha::Schema::Result::RestrictionType =cut @@ -15,11 +15,11 @@ use warnings; use base 'DBIx::Class::Core'; -=head1 TABLE: C +=head1 TABLE: C =cut -__PACKAGE__->table("debarment_types"); +__PACKAGE__->table("restriction_types"); =head1 ACCESSORS @@ -89,8 +89,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-04 11:05:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cRSViJItfpT3mxCX82/9eQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:05 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CC8yZ6IqZPnySpMC5Mn/ig __PACKAGE__->add_columns( '+is_system' => { is_boolean => 1 }, -- 2.20.1