Commit | Line | Data |
4a65f60b |
1 | package DBIx::Class::DeploymentHandler::WithMonotonicVersions; |
2 | use Moose::Role; |
3 | |
9deabd1f |
4 | # ABSTRACT: Delegate/Role for DBIx::Class::DeploymentHandler::VersionHandler::Monotonic |
5 | |
4a65f60b |
6 | use DBIx::Class::DeploymentHandler::VersionHandler::Monotonic; |
7 | |
8 | has version_handler => ( |
9 | is => 'ro', |
10 | lazy_build => 1, |
11 | does => 'DBIx::Class::DeploymentHandler::HandlesVersioning', |
12 | handles => 'DBIx::Class::DeploymentHandler::HandlesVersioning', |
13 | ); |
14 | |
15 | sub _build_version_handler { |
16 | my $self = shift; |
17 | |
18 | my $args = { |
19 | database_version => $self->database_version, |
20 | schema_version => $self->schema_version, |
21 | }; |
22 | |
23 | $args->{to_version} = $self->to_version if $self->has_to_version; |
24 | DBIx::Class::DeploymentHandler::VersionHandler::Monotonic->new($args); |
25 | } |
26 | |
27 | 1; |
28 | |
e52174e3 |
29 | # vim: ts=2 sw=2 expandtab |
4a65f60b |
30 | |
e52174e3 |
31 | __END__ |
feca70da |
32 | |
33 | =head1 DELEGATION ROLE |
34 | |
35 | This role is entirely for making delegation look like a role. The actual |
36 | docs for the methods and attributes are at |
37 | L<DBIx::Class::DeploymentHandler::VersionHandler::Monotonic> |