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