doc for HandlesDeploy
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / Deprecated.pm
CommitLineData
01342998 1package DBIx::Class::DeploymentHandler::Deprecated;
2
3use Moose;
4use Moose::Util 'apply_all_roles';
5
6extends '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 9with 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedSqltDeployMethod',
10 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage';
41219a5d 11with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
01342998 12
13sub 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
311;
32
33__END__
34
35vim: ts=2 sw=2 expandtab