when running perl scripts in deploy, use a $schema that is generated from the current...
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / ProvideSchema / FromCurrent.pm
diff --git a/lib/DBIx/Class/DeploymentHandler/ProvideSchema/FromCurrent.pm b/lib/DBIx/Class/DeploymentHandler/ProvideSchema/FromCurrent.pm
new file mode 100644 (file)
index 0000000..7129a25
--- /dev/null
@@ -0,0 +1,22 @@
+package DBIx::Class::DeploymentHandler::ProvideSchema::SQL::FromCurrent;
+
+use Moose;
+with 'DBIx::Class::DeploymentHandler::HandlesProvideSchema';
+
+has schema => (is=>'ro', required=>1);
+
+sub migration_schema { shift->schema }
+
+1;
+
+# vim: ts=2 sw=2 expandtab
+
+__END__
+
+=method schema_for_run_files
+
+  my $schema = $dh->schema_for_run_files;
+
+Provides a L<DBIx::Class::Schema> object that we can pass to the Perl deploy
+scripts.  We just return whatever C<$schema> you passed when you instantiated
+the L<DBIx::Class::DeploymentHandler> object.