X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FDad.pm;fp=lib%2FDBIx%2FClass%2FDeploymentHandler%2FDad.pm;h=f948f21a5dfbf2535dd217d2de7e8082db0bde28;hb=cefb17d43f1405285036ab195ed4fe5e55eae422;hp=85757a9e7cf0427285c300976ae450849511317d;hpb=d794b8ce62bdbdab42015f4a9ab93946f3f97af5;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/Dad.pm b/lib/DBIx/Class/DeploymentHandler/Dad.pm index 85757a9..f948f21 100644 --- a/lib/DBIx/Class/DeploymentHandler/Dad.pm +++ b/lib/DBIx/Class/DeploymentHandler/Dad.pm @@ -11,7 +11,6 @@ has schema => ( isa => 'DBIx::Class::Schema', is => 'ro', required => 1, - handles => ['schema_version'], ); has backup_directory => ( @@ -27,6 +26,13 @@ has to_version => ( sub _build_to_version { $_[0]->schema->schema_version } +has schema_version => ( + is => 'ro', + lazy_build => 1, +); + +sub _build_schema_version { $_[0]->schema->schema_version } + method install { croak 'Install not possible as versions table already exists in database' if $self->version_storage_is_installed;