From: Arthur Axel 'fREW' Schmidt Date: Fri, 9 Mar 2012 20:53:53 +0000 (-0600) Subject: Use ->count instead of ->next to check if version storage is deployed X-Git-Tag: v0.002110~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=commitdiff_plain;h=456f757182928d5a1590ffe0588b51cdb2ed7854 Use ->count instead of ->next to check if version storage is deployed ->next caused issues on MSSQL due to length of DDL --- diff --git a/Changes b/Changes index 583da08..1479a61 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for {{$dist->name}} {{$NEXT}} + - Use ->count instead of ->next to check if version storage is deployed + (->next caused issues on MSSQL due to length of DDL) 0.002100 2012-03-03 17:09:21 CST6CDT - Wrap upgrades, downgrades, and installs in a transaction, as a failure diff --git a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated/VersionResultSet.pm b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated/VersionResultSet.pm index e1de084..08c15f1 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated/VersionResultSet.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated/VersionResultSet.pm @@ -12,7 +12,7 @@ use Time::HiRes 'gettimeofday'; sub version_storage_is_installed { my $self = shift; - try { $self->next; 1 } catch { undef } + try { $self->count; 1 } catch { undef } } sub database_version { diff --git a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm index fe91ff8..e01517e 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard/VersionResultSet.pm @@ -11,7 +11,7 @@ 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 {