disallow undef in versions
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / VersionHandler / ExplicitVersions.pm
index 2661cac..625e2f6 100644 (file)
@@ -21,6 +21,7 @@ has database_version => (
 
 has to_version => (
   is         => 'ro',
+  isa        => 'Str',
   lazy_build => 1,
 );
 
@@ -93,8 +94,8 @@ sub previous_version_set {
   } else {
     my $next_idx = $self->_dec_version_idx;
     return [
-      $self->ordered_versions->[$next_idx    ],
       $self->ordered_versions->[$next_idx + 1],
+      $self->ordered_versions->[$next_idx    ],
     ];
   }
 }