Only ensure_connected if deployment_statements isnt pased a type
Jess Robinson [Thu, 22 Jun 2006 22:42:17 +0000 (22:42 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index fb0fbca..247a989 100644 (file)
@@ -915,7 +915,7 @@ L<DBIx::Class::Schema/deploy>.
 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 ||= './';