From: Peter Rabbitson Date: Thu, 19 Nov 2009 11:04:21 +0000 (+0000) Subject: Bail out eary in Versioned if no versioning checks are requested X-Git-Tag: v0.08116~137 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=06f10f6fd21b02977d32c4bf833f3bb594f4181f;hp=41df629c7a94f2731404ec11d224e968c16e6e94;p=dbsrgits%2FDBIx-Class.git Bail out eary in Versioned if no versioning checks are requested --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 3e7f517..e8854e3 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -472,6 +472,10 @@ sub _on_connect my ($self, $args) = @_; $args = {} unless $args; + + # useful when connecting from scripts etc + return if ($args->{ignore_version} || ($ENV{DBIC_NO_VERSION_CHECK} && !exists $args->{ignore_version})); + $self->{vschema} = DBIx::Class::Version->connect(@{$self->storage->connect_info()}); my $vtable = $self->{vschema}->resultset('Table'); @@ -486,8 +490,6 @@ sub _on_connect } } - # useful when connecting from scripts etc - return if ($args->{ignore_version} || ($ENV{DBIC_NO_VERSION_CHECK} && !exists $args->{ignore_version})); my $pversion = $self->get_db_version(); if($pversion eq $self->schema_version)