From: Jess Robinson Date: Thu, 22 Jun 2006 22:42:17 +0000 (+0000) Subject: Only ensure_connected if deployment_statements isnt pased a type X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c377d939ac84c511546add4679e2b7054a5abdab;p=dbsrgits%2FDBIx-Class-Historic.git Only ensure_connected if deployment_statements isnt pased a type --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index fb0fbca..247a989 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -915,7 +915,7 @@ L. sub deployment_statements { my ($self, $schema, $type, $version, $dir, $sqltargs) = @_; # Need to be connected to get the correct sqlt_type - $self->ensure_connected(); + $self->ensure_connected() unless $type; $type ||= $self->sqlt_type; $version ||= $schema->VERSION || '1.x'; $dir ||= './';