1 package DBIx::Class::DeploymentHandler::Deprecated;
3 # ABSTRACT: (DEPRECATED) Use this if you are stuck in the past
6 use Moose::Util 'apply_all_roles';
8 extends 'DBIx::Class::DeploymentHandler::Dad';
9 use DBIx::Class::DeploymentHandler::WithApplicatorDumple2;
10 # a single with would be better, but we can't do that
11 # see: http://rt.cpan.org/Public/Bug/Display.html?id=46347
12 with WithApplicatorDumple2(
13 interface_role => 'DBIx::Class::DeploymentHandler::HandlesDeploy',
14 class_name => 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated',
15 delegate_name => 'deploy_method',
16 attributes_to_assume => ['schema'],
17 attributes_to_copy => [qw( script_directory databases sql_translator_args )],
19 WithApplicatorDumple2(
20 interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersionStorage',
21 class_name => 'DBIx::Class::DeploymentHandler::VersionStorage::Deprecated',
22 delegate_name => 'version_storage',
23 attributes_to_assume => ['schema'],
25 with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
30 if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) {
33 WithApplicatorDumple2(
34 interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
35 class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions',
36 delegate_name => 'version_handler',
37 attributes_to_assume => [qw( database_version schema_version to_version )],
43 WithApplicatorDumple2(
44 interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
45 class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions',
46 delegate_name => 'version_handler',
47 attributes_to_assume => [qw( database_version schema_version to_version )],
51 # the following is just a hack so that ->version_storage
53 $self->version_storage;
56 __PACKAGE__->meta->make_immutable;
60 # vim: ts=2 sw=2 expandtab
66 I begrudgingly made this module (and other related modules) to make porting
67 from L<DBIx::Class::Schema::Versioned> relatively simple. I will make changes
68 to ensure that it works with output from L<DBIx::Class::Schema::Versioned> etc,
69 but I will not add any new features to it. It already lacks numerous features
70 that the full version provides in style:
80 Multiple files for migrations
84 Perl files in migrations
88 Shared Perl/SQL for different databases
92 And there's probably more.
94 At version 1.000000 usage of this module will emit a warning. At version
95 2.000000 it will be removed entirely.
97 To migrate to the New Hotness take a look at:
98 L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated/THIS SUCKS> and
99 L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated/THIS SUCKS>.
103 Look at L<DBIx::Class::DeploymentHandler/SYNPOSIS>. I won't repeat
104 it here to emphasize, yet again, that this should not be used unless you really
105 want to live in the past.
107 =head1 WHERE IS ALL THE DOC?!
109 C<DBIx::Class::DeploymentHandler::Deprecated> extends
110 L<DBIx::Class::DeploymentHandler::Dad>, so that's probably the first place to
111 look when you are trying to figure out how everything works.
113 Next would be to look at all the pieces that fill in the blanks that
114 L<DBIx::Class::DeploymentHandler::Dad> expects to be filled. They would be
115 L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated>,
116 L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated>, and
117 L<DBIx::Class::DeploymentHandler::WithReasonableDefaults>. Also, this class
118 is special in that it applies either
119 L<DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions> or
120 L<DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions> depending on