From dd39accddb972079d98c2f4319f11d6652264652 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Fri, 15 May 2020 11:09:51 -0300 Subject: [PATCH] Bug 23019: Add ImportBatchesProfile schema and set is_boolean to parse_items column Signed-off-by: Abbey Holt Signed-off-by: Nick Clemens --- Koha/Schema/Result/ImportBatchesProfile.pm | 180 +++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 Koha/Schema/Result/ImportBatchesProfile.pm diff --git a/Koha/Schema/Result/ImportBatchesProfile.pm b/Koha/Schema/Result/ImportBatchesProfile.pm new file mode 100644 index 0000000000..a17b0054d4 --- /dev/null +++ b/Koha/Schema/Result/ImportBatchesProfile.pm @@ -0,0 +1,180 @@ +use utf8; +package Koha::Schema::Result::ImportBatchesProfile; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::ImportBatchesProfile + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("import_batches_profile"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 name + + data_type: 'varchar' + is_nullable: 0 + size: 100 + +=head2 matcher_id + + data_type: 'integer' + is_nullable: 1 + +=head2 template_id + + data_type: 'integer' + is_nullable: 1 + +=head2 overlay_action + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 nomatch_action + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 item_action + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 parse_items + + data_type: 'tinyint' + is_nullable: 1 + +=head2 record_type + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 encoding + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 format + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 comments + + data_type: 'longtext' + is_nullable: 1 + +=cut + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "name", + { data_type => "varchar", is_nullable => 0, size => 100 }, + "matcher_id", + { data_type => "integer", is_nullable => 1 }, + "template_id", + { data_type => "integer", is_nullable => 1 }, + "overlay_action", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "nomatch_action", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "item_action", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "parse_items", + { data_type => "tinyint", is_nullable => 1 }, + "record_type", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "encoding", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "format", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "comments", + { data_type => "longtext", is_nullable => 1 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS + +=head2 import_batches + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "import_batches", + "Koha::Schema::Result::ImportBatch", + { "foreign.profile_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-06-03 15:47:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BWFz5yLEEP6ANuAWKAMCeg + +__PACKAGE__->add_columns( + '+parse_items' => { is_boolean => 1 }, +); + +=head2 koha_object_class + + Koha Object class + +=cut + +sub koha_object_class { + 'Koha::ImportBatchProfile'; +} + +=head2 koha_objects_class + + Koha Objects class + +=cut + +sub koha_objects_class { + 'Koha::ImportBatchProfiles'; +} + +1; -- 2.11.0