add abstracts
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / Deprecated.pm
1 package DBIx::Class::DeploymentHandler::Deprecated;
2
3 # ABSTRACT: (DEPRECATED) Use this if you are stuck in the past
4
5 use Moose;
6 use Moose::Util 'apply_all_roles';
7
8 extends 'DBIx::Class::DeploymentHandler::Dad';
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
11 with 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedSqltDeployMethod',
12      'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage';
13 with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
14
15 sub BUILD {
16   my $self = shift;
17
18   if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) {
19     apply_all_roles(
20       $self,
21       'DBIx::Class::DeploymentHandler::WithExplicitVersions'
22     );
23   } else {
24     apply_all_roles(
25       $self,
26       'DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions'
27     );
28   }
29 }
30
31 __PACKAGE__->meta->make_immutable;
32
33 1;
34
35 # vim: ts=2 sw=2 expandtab
36
37 __END__
38
39