From: Eric A. Miller Date: Mon, 25 Aug 2014 02:54:36 +0000 (-0400) Subject: Disconnect after schema version check. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=054dfcbb4e70905a3857e3fc0b9e9f2e4c2e5389;p=dbsrgits%2FDBIx-Class-Historic.git Disconnect after schema version check. --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 95adc66..0a25485 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -613,17 +613,20 @@ sub _on_connect if($pversion eq $self->schema_version) { #carp "This version is already installed"; + $self->{vschema}->storage->disconnect; return 1; } if(!$pversion) { carp "Your DB is currently unversioned. Please call upgrade on your schema to sync the DB."; + $self->{vschema}->storage->disconnect; return 1; } carp "Versions out of sync. This is " . $self->schema_version . ", your database contains version $pversion, please call upgrade on your Schema."; + $self->{vschema}->storage->disconnect; } # is this just a waste of time? if not then merge with DBI.pm