my $storage = $storage_class->new;
$storage->connect_info(\@info);
$self->storage($storage);
- $self->storage->on_connect(sub { $self->on_connect() } )if($self->can('on_connect'));
+ $self->on_connect() if($self->can('on_connect'));
return $self;
}
sub deploy {
my ($self, $sqltargs) = @_;
$self->throw_exception("Can't deploy without storage") unless $self->storage;
+ $self->storage->ensure_connected();
$self->storage->deploy($self, undef, $sqltargs);
}