1 package DBIx::Class::DeploymentHandler::ProvideSchema::SchemaLoader;
4 use DBIx::Class::Schema::Loader;
6 with 'DBIx::Class::DeploymentHandler::HandlesProvideSchema';
8 has schema => (is=>'ro', required=>1);
11 naming => { ALL => 'v7'},
13 debug => $ENV{DBIC_DEPLOYMENTHANDLER_DEBUG}||0);
17 sub migration_schema {
18 my $schema = shift->schema->clone;
19 my $name = ref($schema) . $cnt++;
20 DBIx::Class::Schema::Loader::make_schema_at
21 $name, \%opts, [ sub {$schema->storage->dbh} ];
26 # vim: ts=2 sw=2 expandtab
30 =method schema_for_run_files
32 my $schema = $dh->schema_for_run_files;
34 Provides a L<DBIx::Class::Schema> object that we can pass to the Perl deploy
35 scripts. We reverse engineer a C<$schema> from whatever is currently deployed
36 to the database using L<DBIx::Class::Schema::Loader>