lots more doc
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / Deprecated.pm
CommitLineData
01342998 1package DBIx::Class::DeploymentHandler::Deprecated;
2
9deabd1f 3# ABSTRACT: (DEPRECATED) Use this if you are stuck in the past
4
01342998 5use Moose;
6use Moose::Util 'apply_all_roles';
7
8extends '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 11with 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedSqltDeployMethod',
12 'DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage';
41219a5d 13with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
01342998 14
15sub 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
331;
34
e52174e3 35# vim: ts=2 sw=2 expandtab
36
01342998 37__END__
38
bcc72297 39=head1 DEPRECATED
e52174e3 40
bcc72297 41I begrudgingly made this module (and other related modules) to make porting
42from L<DBIx::Class::Schema::Versioned> relatively simple. I will make changes
43to ensure that it works with output from L<DBIx::Class::Schema::Versioned> etc,
44but I will not add any new features to it. It already lacks numerous features
45that the full version provides in style:
46
47=over
48
49=item *
50
51Downgrades
52
53=item *
54
55Multiple files for migrations
56
57=item *
58
59Perl files in migrations
60
61=item *
62
63Shared Perl/SQL for different databases
64
65=back
66
67And there's probably more.
68
69At version 1.000000 usage of this module will emit a warning. At version
702.000000 it will be removed entirely.
71
72To migrate to the New Hotness take a look at:
73L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated/THIS SUCKS> and
74L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated/THIS SUCKS>.
75
76=head1 SYNOPSIS
77
78Look at L<DBIx::Class::DeploymentHandler/SYNPOSIS>. I won't repeat
79it here to emphasize, yet again, that this should not be used unless you really
80want to live in the past.
81
82=head1 WHERE IS ALL THE DOC?!
83
84C<DBIx::Class::DeploymentHandler::Deprecated> extends
85L<DBIx::Class::DeploymentHandler::Dad>, so that's probably the first place to
86look when you are trying to figure out how everything works.
87
88Next would be to look at all the roles that fill in the blanks that
89L<DBIx::Class::DeploymentHandler::Dad> expects to be filled. They would be
90L<DBIx::Class::DeploymentHandler::Deprecated::WithSqltDeployMethod>,
91L<DBIx::Class::DeploymentHandler::Deprecated::WithDeprecatedVersionStorage>, and
92L<DBIx::Class::DeploymentHandler::WithReasonableDefaults>. Also, this class
93is special in that it applies either
94L<DBIx::Class::DeploymentHandler::WithExplicitVersions> or
95L<DBIx::Class::DeploymentHandler::WithDatabaseToSchemaVersions> depending on
96your schema.