[Dbix-class] Add an 'excludes' option to DBIC::Fixtures->dump

Alexander Hartmaier alexander.hartmaier at t-systems.at
Fri Feb 11 20:53:11 GMT 2011


This isn't directly related to this but such a long table name will fail
in Oracle.

--
Best regards, Alex


On Thu, 2011-02-10 at 00:08 +0100, John Napiorkowski wrote:
> The DBIC::Fixtures->dump({all=>1, ...}) option is really useful to just dump the
> entire db.  However, if you are using versioning tools, like
> DBIC::DeploymentHandler, this will pickup the generated tables to manage
> versioning (for example, DBIC::DeploymentHandler creates a table called
> 'dbix_class_deploymenthandler_versions') which is something you probably don't
> want, if you are using DBIC::Fixtures with versioning.
>
> I propose adding a new dump method options called 'exclude', which takes an
> arrayref of source names to skip when processing the 'all' option.  I've cut a
> branch and am proposing a patch similar to:
>
> http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class-Fixtures.git;a=commitdiff;h=47a8ceb927de1d34efb41834e89dd6020a0d3191
>
>
> I tested this on my personal application and found it to work.   Here's a
> sample:
>
> my $fixtures = DBIx::Class::Fixtures->new({
>   config_dir => Freestock::Web->path_to('share', 'db', 'fixture_configs'),
> });
>
> sub dump_fixtures {
>   $fixtures->dump({
>     all => 1,
>     excludes => ['__VERSION'],
>     schema => $schema,
>     directory => $fixtures_dir,
>   });
> }
>
> Thoughts?  Comments?  Thanks!
>
> John Napiorkowski
>
>
>
> ____________________________________________________________________________________
> The fish are biting.
> Get more visitors on your site using Yahoo! Search Marketing.
> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list