X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FWithDatabaseToSchemaVersions.pm;h=6c086c1fe89787a46137df1b01a971ef9424a166;hb=ee82cb0e76144914d520f60f7369448c188e2fe1;hp=fc80e2e9638010c0fcfc815078d6b7d9d0befb6d;hpb=38bd995681bf834177f11b21ff9eb031a6724a2a;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/WithDatabaseToSchemaVersions.pm b/lib/DBIx/Class/DeploymentHandler/WithDatabaseToSchemaVersions.pm index fc80e2e..6c086c1 100644 --- a/lib/DBIx/Class/DeploymentHandler/WithDatabaseToSchemaVersions.pm +++ b/lib/DBIx/Class/DeploymentHandler/WithDatabaseToSchemaVersions.pm @@ -1,33 +1,27 @@ package DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions; use Moose::Role; -use DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions; +use DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions; use Carp 'carp'; has version_handler => ( - -# < mst> isa => 'DBIx::Class::DeploymentHandler::SqltDeployMethod', -# < mst> should be -# < mst> does => -# < mst> and that role should supply those methods -# < mst> then you can pass handles => as well - - does => 'DBIx::Class::DeploymentHandler::HandlesVersioning', - is => 'ro', + is => 'ro', lazy_build => 1, - handles => 'DBIx::Class::DeploymentHandler::HandlesVersioning', + does => 'DBIx::Class::DeploymentHandler::HandlesVersioning', + handles => 'DBIx::Class::DeploymentHandler::HandlesVersioning', ); sub _build_version_handler { my $self = shift; my $args = { - schema => $self->schema, + database_version => $self->database_version, + schema_version => $self->schema_version, }; $args->{to_version} = $self->to_version if $self->has_to_version; - DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions->new($args); + DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions->new($args); } 1;