faster travis builds
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / VersionStorage / Standard / VersionResultSet.pm
index 79f06a3..e01517e 100644 (file)
@@ -1,5 +1,7 @@
 package DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet;
 
+# ABSTRACT: Predefined searches to find what you want from the version storage
+
 use strict;
 use warnings;
 
@@ -9,15 +11,27 @@ use Try::Tiny;
 
 sub version_storage_is_installed {
   my $self = shift;
-  try { $self->next; 1} catch { undef }
+  try { $self->count; 1 } catch { undef }
 }
 
 sub database_version {
   my $self = shift;
   $self->search(undef, {
-    order_by => { -desc => 'installed' },
+    order_by => { -desc => 'id' },
     rows => 1
   })->get_column('version')->next;
 }
 
 1;
+
+# vim: ts=2 sw=2 expandtab
+
+__END__
+
+=method version_storage_is_installed
+
+True if (!!!) the version storage has been installed
+
+=method database_version
+
+The version of the database