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'; |
7 | with 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedSqltDeployMethod', |
8 | 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage'; |
9 | |
10 | sub BUILD { |
11 | my $self = shift; |
12 | |
fe3b6dff |
13 | if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) { |
01342998 |
14 | apply_all_roles( |
15 | $self, |
fe3b6dff |
16 | 'DBIx::Class::DeploymentHandler::WithExplicitVersions' |
01342998 |
17 | ); |
18 | } else { |
19 | apply_all_roles( |
20 | $self, |
fe3b6dff |
21 | 'DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions' |
01342998 |
22 | ); |
23 | } |
24 | } |
25 | |
26 | __PACKAGE__->meta->make_immutable; |
27 | |
28 | 1; |
29 | |
30 | __END__ |
31 | |
32 | vim: ts=2 sw=2 expandtab |