X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FWithSqltDeployMethod.pm;h=9ff84176565ce0e75be8ec83e1646bf40216e07b;hb=feca70da2cc034f1209e6990b25f15f4b723930d;hp=9bee8e8cf55171fef12165fa371408244e698cad;hpb=e52174e31b95fe335f6ab8cfdbf23cc2a0c05673;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm b/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm index 9bee8e8..9ff8417 100644 --- a/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm +++ b/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm @@ -1,6 +1,8 @@ package DBIx::Class::DeploymentHandler::WithSqltDeployMethod; use Moose::Role; +# ABSTRACT: Delegate/Role for DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator + use DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator; has deploy_method => ( @@ -24,7 +26,7 @@ has databases => ( default => sub { [qw( MySQL SQLite PostgreSQL )] }, ); -has sqltargs => ( +has sql_translator_args => ( isa => 'HashRef', is => 'ro', default => sub { {} }, @@ -32,12 +34,15 @@ has sqltargs => ( sub _build_deploy_method { my $self = shift; - DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator->new({ - schema => $self->schema, - databases => $self->databases, - upgrade_directory => $self->upgrade_directory, - sqltargs => $self->sqltargs, - }); + my $args = { + schema => $self->schema, + databases => $self->databases, + upgrade_directory => $self->upgrade_directory, + sql_translator_args => $self->sql_translator_args, + }; + + $args->{schema_version} = $self->schema_version if $self->has_schema_version; + DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator->new($args); } 1; @@ -45,3 +50,9 @@ sub _build_deploy_method { # vim: ts=2 sw=2 expandtab __END__ + +=head1 DELEGATION ROLE + +This role is entirely for making delegation look like a role. The actual +docs for the methods and attributes are at +L