From 31375cdf84266f18447c7cce1b0454c3871f8d2e Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Mon, 1 Oct 2018 14:00:39 +0200 Subject: [PATCH] Bug 14957: DO NOT PUSH Schema changes --- Koha/Schema/Result/MarcMergeRule.pm | 128 +++++++++++++++++++++++++++++ Koha/Schema/Result/MarcMergeRulesModule.pm | 103 +++++++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 Koha/Schema/Result/MarcMergeRule.pm create mode 100644 Koha/Schema/Result/MarcMergeRulesModule.pm diff --git a/Koha/Schema/Result/MarcMergeRule.pm b/Koha/Schema/Result/MarcMergeRule.pm new file mode 100644 index 0000000000..429eefc1bc --- /dev/null +++ b/Koha/Schema/Result/MarcMergeRule.pm @@ -0,0 +1,128 @@ +use utf8; +package Koha::Schema::Result::MarcMergeRule; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::MarcMergeRule + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("marc_merge_rules"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 tag + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 module + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 0 + size: 255 + +=head2 filter + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 add + + data_type: 'tinyint' + is_nullable: 0 + +=head2 append + + data_type: 'tinyint' + is_nullable: 0 + +=head2 remove + + data_type: 'tinyint' + is_nullable: 0 + +=head2 delete + + accessor: undef + data_type: 'tinyint' + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "tag", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "module", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 255 }, + "filter", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "add", + { data_type => "tinyint", is_nullable => 0 }, + "append", + { data_type => "tinyint", is_nullable => 0 }, + "remove", + { data_type => "tinyint", is_nullable => 0 }, + "delete", + { accessor => undef, data_type => "tinyint", is_nullable => 0 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS + +=head2 module + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "module", + "Koha::Schema::Result::MarcMergeRulesModule", + { name => "module" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-20 08:56:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CLrTLesHXkGKCs89us0xgQ + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/MarcMergeRulesModule.pm b/Koha/Schema/Result/MarcMergeRulesModule.pm new file mode 100644 index 0000000000..5f16bc7c16 --- /dev/null +++ b/Koha/Schema/Result/MarcMergeRulesModule.pm @@ -0,0 +1,103 @@ +use utf8; +package Koha::Schema::Result::MarcMergeRulesModule; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::MarcMergeRulesModule + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("marc_merge_rules_modules"); + +=head1 ACCESSORS + +=head2 name + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 description + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 specificity + + data_type: 'integer' + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "name", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "description", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "specificity", + { data_type => "integer", is_nullable => 0 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("name"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("specificity", ["specificity"]); + +=head1 RELATIONS + +=head2 marc_merge_rules + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "marc_merge_rules", + "Koha::Schema::Result::MarcMergeRule", + { "foreign.module" => "self.name" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-15 12:11:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bNG+m3wj6NDa6mZCtI2nKg + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; -- 2.11.0