From 51d59996d76a75732bb33dddeae852d34735e8d9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 25 Jul 2014 08:38:45 -0400 Subject: [PATCH] Bug 12603 [QA Followup] Content-Type: text/plain; charset=utf-8 * Fix syntax error * Remove Schema files for nonexistant tables * Fix circular dependency * Makes unpushed followup for bug 11518 unnessary Signed-off-by: Kyle M Hall Signed-off-by: Marcel de Rooy --- Koha/Schema/Result/Biblio.pm | 2 +- Koha/Schema/Result/Closure.pm | 79 ------------------------------------ Koha/Schema/Result/ClosureRrule.pm | 69 ------------------------------- t/lib/TestBuilder.pm | 2 +- 4 files changed, 2 insertions(+), 150 deletions(-) delete mode 100644 Koha/Schema/Result/Closure.pm delete mode 100644 Koha/Schema/Result/ClosureRrule.pm diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 5f2e399..ee22858 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -331,7 +331,7 @@ __PACKAGE__->many_to_many("sets", "oai_sets_biblios", "set"); # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0//8OGf7OteNnwT03g4QsA -__PACKAGE__->belongs_to( +__PACKAGE__->has_one( "biblioitem", "Koha::Schema::Result::Biblioitem", { "foreign.biblionumber" => "self.biblionumber" } diff --git a/Koha/Schema/Result/Closure.pm b/Koha/Schema/Result/Closure.pm deleted file mode 100644 index 22654e6..0000000 --- a/Koha/Schema/Result/Closure.pm +++ /dev/null @@ -1,79 +0,0 @@ -package Koha::Schema::Result::Closure; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -use strict; -use warnings; - -use base 'DBIx::Class::Core'; - - -=head1 NAME - -Koha::Schema::Result::Closure - -=cut - -__PACKAGE__->table("closure"); - -=head1 ACCESSORS - -=head2 closureid - - data_type: 'integer' - is_auto_increment: 1 - is_nullable: 0 - -=head2 description - - data_type: 'text' - is_nullable: 1 - -=head2 branchcode - - data_type: 'varchar' - is_nullable: 0 - size: 10 - -=head2 title - - data_type: 'varchar' - is_nullable: 1 - size: 255 - -=head2 event_start - - data_type: 'datetime' - is_nullable: 1 - -=head2 event_end - - data_type: 'datetime' - is_nullable: 1 - -=cut - -__PACKAGE__->add_columns( - "closureid", - { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, - "description", - { data_type => "text", is_nullable => 1 }, - "branchcode", - { data_type => "varchar", is_nullable => 0, size => 10 }, - "title", - { data_type => "varchar", is_nullable => 1, size => 255 }, - "event_start", - { data_type => "datetime", is_nullable => 1 }, - "event_end", - { data_type => "datetime", is_nullable => 1 }, -); -__PACKAGE__->set_primary_key("closureid"); - - -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yA2qWZ8+Om9n0UAev2wl1Q - - -# You can replace this text with custom content, and it will be preserved on regeneration -1; diff --git a/Koha/Schema/Result/ClosureRrule.pm b/Koha/Schema/Result/ClosureRrule.pm deleted file mode 100644 index f5c8a03..0000000 --- a/Koha/Schema/Result/ClosureRrule.pm +++ /dev/null @@ -1,69 +0,0 @@ -package Koha::Schema::Result::ClosureRrule; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -use strict; -use warnings; - -use base 'DBIx::Class::Core'; - - -=head1 NAME - -Koha::Schema::Result::ClosureRrule - -=cut - -__PACKAGE__->table("closure_rrule"); - -=head1 ACCESSORS - -=head2 closureid - - data_type: 'integer' - is_nullable: 1 - -=head2 recurrence_start - - data_type: 'datetime' - is_nullable: 1 - -=head2 recurrence_end - - data_type: 'datetime' - is_nullable: 1 - -=head2 frequency - - data_type: 'varchar' - is_nullable: 1 - size: 10 - -=head2 days_interval - - data_type: 'integer' - is_nullable: 1 - -=cut - -__PACKAGE__->add_columns( - "closureid", - { data_type => "integer", is_nullable => 1 }, - "recurrence_start", - { data_type => "datetime", is_nullable => 1 }, - "recurrence_end", - { data_type => "datetime", is_nullable => 1 }, - "frequency", - { data_type => "varchar", is_nullable => 1, size => 10 }, - "days_interval", - { data_type => "integer", is_nullable => 1 }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g4CMCw0JgKii7mgfHkqThQ - - -# You can replace this text with custom content, and it will be preserved on regeneration -1; diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index bb3ab74..2497ffd 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -189,7 +189,7 @@ sub _getForeignKeys { }; my @keys = (); - while( my ($col_fk_name, $col_name) = each($rel_info->{cond}) ) { + while( my ($col_fk_name, $col_name) = each(%{$rel_info->{cond}}) ) { $col_name =~ s|self.(\w+)|$1|; $col_fk_name =~ s|foreign.(\w+)|$1|; push @keys, { -- 1.7.7.6