Skip Menu |

This queue is for tickets about the Test-Fixture-DBIC-Schema CPAN distribution.

Report information
The Basics
Id: 53814
Status: resolved
Priority: 0/
Queue: Test-Fixture-DBIC-Schema

People
Owner: schwigon [...] cpan.org
Requestors: schwigon [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: [PATCH] Consider that views may exist
Test/Fixture/DBIC/Schema tries to write access tables in _delete_all(). Since views ("DBIx::Class::ResultSource::View") may exist this should only be tried for real tables. The attached patch does this. Feel free to point me to a repository and give me co-maint if you are short on time. Thanks. Kind regards, Steffen -- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/> Deutscher Perl-Workshop <http://www.perl-workshop.de/>
Subject: fixture_views.patch
--- Test/Fixture/DBIC/Schema.pm.orig 2010-01-19 11:26:58.000000000 +0100 +++ Test/Fixture/DBIC/Schema.pm 2010-01-19 11:27:02.000000000 +0100 @@ -63,7 +63,9 @@ sub _delete_all { my $schema = shift; - $schema->resultset($_)->delete for $schema->sources; + $schema->resultset($_)->delete for + grep { $schema->source_registrations->{$_}->isa('DBIx::Class::ResultSource::Table') } + $schema->sources; } sub _insert {
Subject: Re: [rt.cpan.org #53814] [PATCH] Consider that views may exist
Date: Tue, 19 Jan 2010 22:26:56 +0900
To: bug-Test-Fixture-DBIC-Schema [...] rt.cpan.org
From: Tokuhiro Matsuno <tokuhirom [...] gmail.com>
Hi Steffen, I gave co-maint for you @pause.perl.org. And, repository is here: http://github.com/tokuhirom/p5-test-fixture-dbic-schema/.I added you as collaborator. # I don't use DBIC today. regards, On Tue, Jan 19, 2010 at 7:45 PM, Steffen Schwigon via RT <bug-Test-Fixture-DBIC-Schema@rt.cpan.org> wrote: Show quoted text
> Tue Jan 19 05:45:03 2010: Request 53814 was acted upon. > Transaction: Ticket created by SCHWIGON >       Queue: Test-Fixture-DBIC-Schema >     Subject: [PATCH] Consider that views may exist >   Broken in: 0.02 >    Severity: Important >       Owner: Nobody >  Requestors: schwigon@cpan.org >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53814 > > > > Test/Fixture/DBIC/Schema tries to write access tables in _delete_all(). > > Since views ("DBIx::Class::ResultSource::View") may exist this should > only be tried for real tables. > > The attached patch does this. > > Feel free to point me to a repository and > give me co-maint if you are short on time. > > Thanks. > > Kind regards, > Steffen > -- > Steffen Schwigon <ss5@renormalist.net> > Dresden Perl Mongers <http://dresden-pm.org/> > Deutscher Perl-Workshop <http://www.perl-workshop.de/> >
RT-Send-CC: tokuhirom [...] gmail.com
Fixed with 0.03. -- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/> Deutscher Perl-Workshop <http://www.perl-workshop.de/>