X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FVersionStorage%2FStandard%2FVersionResultSet.pm;h=82d5e1ecb555f728dca2c4a38bad252496cbb673;hb=3d3e2f000133e54ab4e71c17072ed2d429c93b8a;hp=52d73ecaff16876cdd232fdd22ccc13848be044f;hpb=30c3818a792878356b3b2f6b7e929a74d3a6974d;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm index 52d73ec..82d5e1e 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm @@ -9,15 +9,19 @@ use Try::Tiny; sub version_storage_is_installed { my $self = shift; - try { $self->next; 1} catch { undef } + try { $self->next; 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 || 0; + })->get_column('version')->next; } 1; + +__END__ + +vim: ts=2 sw=2 expandtab