Commit | Line | Data |
01342998 |
1 | package DBIx::Class::DeploymentHandler::Deprecated; |
2 | |
3 | use Moose; |
4 | use Moose::Util 'apply_all_roles'; |
5 | |
6 | extends 'DBIx::Class::DeploymentHandler::Dad'; |
41219a5d |
7 | # a single with would be better, but we can't do that |
8 | # see: http://rt.cpan.org/Public/Bug/Display.html?id=46347 |
01342998 |
9 | with 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedSqltDeployMethod', |
10 | 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage'; |
41219a5d |
11 | with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults'; |
01342998 |
12 | |
13 | sub BUILD { |
14 | my $self = shift; |
15 | |
fe3b6dff |
16 | if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) { |
01342998 |
17 | apply_all_roles( |
18 | $self, |
fe3b6dff |
19 | 'DBIx::Class::DeploymentHandler::WithExplicitVersions' |
01342998 |
20 | ); |
21 | } else { |
22 | apply_all_roles( |
23 | $self, |
fe3b6dff |
24 | 'DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions' |
01342998 |
25 | ); |
26 | } |
27 | } |
28 | |
29 | __PACKAGE__->meta->make_immutable; |
30 | |
31 | 1; |
32 | |
33 | __END__ |
34 | |
35 | vim: ts=2 sw=2 expandtab |