| 1 | package DBIx::Class::Migration::SandboxDirSandboxBuilder; | ||
| 2 | |||
| 3 | use Moo; | ||
| 4 | |||
| 5 | has migration => ( | ||
| 6 | is => 'ro', | ||
| 7 | weak_ref => 1, | ||
| 8 | required => 1); | ||
| 9 | |||
| 10 | sub build { | ||
| 11 | my $migration = shift->migration; | ||
| 12 | return $migration->db_sandbox_class | ||
| 13 | ->new(target_dir=>$migration->db_sandbox_dir, | ||
| 14 | schema_class=>$migration->_infer_schema_class); | ||
| 15 | } | ||
| 16 | |||
| 17 | __PACKAGE__->meta->make_immutable; | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | DBIx::Class::Migration::SandboxDirSandboxBuilder - Build a sandbox at db_sandbox_dir | ||
| 22 | |||
| 23 | =head1 SYNOPSIS | ||
| 24 | |||
| 25 | use DBIx::Class::Migration::SandboxDirSandboxBuilder; | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | Helper class that creates a C<db_sandbox> in the C<db_sandbox_dir>. | ||
| 30 | |||
| 31 | Useful when you want your sandbox in a different directory from the rest of your | ||
| 32 | deployment and fixture files. | ||
| 33 | |||
| 34 | =head1 SEE ALSO | ||
| 35 | |||
| 36 | L<DBIx::Class::Migration>, L<DBIx::Class::Migration::Sandbox>. | ||
| 37 | |||
| 38 | =head1 AUTHOR | ||
| 39 | |||
| 40 | See L<DBIx::Class::Migration> for author information | ||
| 41 | |||
| 42 | =head1 COPYRIGHT & LICENSE | ||
| 43 | |||
| 44 | See L<DBIx::Class::Migration> for copyright and license information | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 |