Commit | Line | Data |
e70a1600 |
1 | package DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions; |
2 | use Moose::Role; |
3 | |
4 | use DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions; |
5 | |
6 | use Carp 'carp'; |
7 | |
8 | has version_handler => ( |
9 | |
10 | # < mst> isa => 'DBIx::Class::DeploymentHandler::SqltDeployMethod', |
11 | # < mst> should be |
12 | # < mst> does => <some role> |
13 | # < mst> and that role should supply those methods |
14 | # < mst> then you can pass handles => <some role> as well |
15 | |
16 | isa => 'DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions', |
17 | is => 'ro', |
18 | lazy_build => 1, |
19 | handles => [qw{ ordered_schema_versions }], |
20 | ); |
21 | |
22 | sub _build_version_handler { |
23 | my $self = shift; |
24 | DBIx::Class::DeploymentHandler::DatabaseToSchemaVersions->new({ |
25 | schema => $self->schema, |
26 | }); |
27 | } |
28 | |
29 | 1; |
30 | |
31 | __END__ |
32 | |
33 | vim: ts=2 sw=2 expandtab |