From c3a65d2d0f3464f9ccae5273bae2eb96f4aa4e68 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Fri, 15 May 2020 11:09:51 -0300 Subject: [PATCH] Bug 23019: Add koha_object_class and koha_objects_class methods to ImportBatch.pm schema Signed-off-by: Abbey Holt Signed-off-by: Nick Clemens --- Koha/Schema/Result/ImportBatch.pm | 52 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/Koha/Schema/Result/ImportBatch.pm b/Koha/Schema/Result/ImportBatch.pm index c2fd81c79a..63641181dd 100644 --- a/Koha/Schema/Result/ImportBatch.pm +++ b/Koha/Schema/Result/ImportBatch.pm @@ -117,6 +117,12 @@ __PACKAGE__->table("import_batches"); data_type: 'longtext' is_nullable: 1 +=head2 profile_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -203,6 +209,8 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 100 }, "comments", { data_type => "longtext", is_nullable => 1 }, + "profile_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -234,10 +242,48 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 profile + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "profile", + "Koha::Schema::Result::ImportBatchesProfile", + { id => "profile_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "SET NULL", + }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-06-03 15:47:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jGfBdM8ht823HaxSr2c9Wg -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:41giNJCRD9WXC4IGO/1D3A +=head2 koha_object_class + + Koha Object class + +=cut + +sub koha_object_class { + 'Koha::ImportBatch'; +} + +=head2 koha_objects_class + + Koha Objects class + +=cut +sub koha_objects_class { + 'Koha::ImportBatches'; +} -# You can replace this text with custom content, and it will be preserved on regeneration 1; -- 2.11.0