finally put deploy where it actually belongs
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / SqltDeployMethod.pm
index 2f5ddab..255bdfd 100644 (file)
@@ -1,6 +1,7 @@
 package DBIx::Class::DeploymentHandler::SqltDeployMethod;
 use Moose;
 use Method::Signatures::Simple;
+use Try::Tiny;
 
 use Carp 'carp';
 
@@ -10,6 +11,12 @@ has storage => (
   lazy_build => 1,
 );
 
+method _build_storage {
+  my $s = $self->schema->storage;
+  $s->_determine_driver;
+  $s
+}
+
 has backup_directory => (
   isa => 'Str',
   is  => 'ro',
@@ -109,10 +116,6 @@ method deployment_statements {
 }
 
 method deploy {
-  my $schema   = $self->schema;
-  my $type     = undef;
-  my $sqltargs = $self->sqltargs;
-  my $dir      = $self->upgrade_directory;
   my $storage  = $self->storage;
 
   my $deploy = sub {
@@ -385,4 +388,4 @@ __PACKAGE__->meta->make_immutable;
 
 __END__
 
-vim: ts=2,sw=2,expandtab
+vim: ts=2 sw=2 expandtab