From: Peter Rabbitson Date: Mon, 23 Nov 2009 00:28:50 +0000 (+0000) Subject: Fix ::Versioned regression introduced in r7925 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c99c480193246b99d8f6bb59e7d4763a481c094b;p=dbsrgits%2FDBIx-Class-Historic.git Fix ::Versioned regression introduced in r7925 --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index e8854e3..bce2032 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -473,12 +473,12 @@ sub _on_connect $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'); + # useful when connecting from scripts etc + return if ($args->{ignore_version} || ($ENV{DBIC_NO_VERSION_CHECK} && !exists $args->{ignore_version})); + # check for legacy versions table and move to new if exists my $vschema_compat = DBIx::Class::VersionCompat->connect(@{$self->storage->connect_info()}); unless ($self->_source_exists($vtable)) {