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 # 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::WithApplicatorDumple' => {
12 interface_role => 'DBIx::Class::DeploymentHandler::HandlesDeploy',
13 class_name => 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated',
14 delegate_name => 'deploy_method',
15 attributes_to_assume => ['schema'],
16 attributes_to_copy => [qw( script_directory databases sql_translator_args )],
18 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
19 interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersionStorage',
20 class_name => 'DBIx::Class::DeploymentHandler::VersionStorage::Deprecated',
21 delegate_name => 'version_storage',
22 attributes_to_assume => ['schema'],
24 with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
29 if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) {
32 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
33 interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
34 class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions',
35 delegate_name => 'version_handler',
36 attributes_to_assume => [qw( database_version schema_version to_version )],
42 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
43 interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
44 class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions',
45 delegate_name => 'version_handler',
46 attributes_to_assume => [qw( database_version schema_version to_version )],
50 # the following is just a hack so that ->version_storage
52 $self->version_storage;
55 __PACKAGE__->meta->make_immutable;
59 # vim: ts=2 sw=2 expandtab
65 I begrudgingly made this module (and other related modules) to make porting
66 from L<DBIx::Class::Schema::Versioned> relatively simple. I will make changes
67 to ensure that it works with output from L<DBIx::Class::Schema::Versioned> etc,
68 but I will not add any new features to it. It already lacks numerous features
69 that the full version provides in style:
79 Multiple files for migrations
83 Perl files in migrations
87 Shared Perl/SQL for different databases
91 And there's probably more.
93 At version 1.000000 usage of this module will emit a warning. At version
94 2.000000 it will be removed entirely.
96 To migrate to the New Hotness take a look at:
97 L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated/THIS SUCKS> and
98 L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated/THIS SUCKS>.
102 Look at L<DBIx::Class::DeploymentHandler/SYNPOSIS>. I won't repeat
103 it here to emphasize, yet again, that this should not be used unless you really
104 want to live in the past.
106 =head1 WHERE IS ALL THE DOC?!
108 C<DBIx::Class::DeploymentHandler::Deprecated> extends
109 L<DBIx::Class::DeploymentHandler::Dad>, so that's probably the first place to
110 look when you are trying to figure out how everything works.
112 Next would be to look at all the pieces that fill in the blanks that
113 L<DBIx::Class::DeploymentHandler::Dad> expects to be filled. They would be
114 L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated>,
115 L<DBIx::Class::DeploymentHandler::VersionStorage::Deprecated>, and
116 L<DBIx::Class::DeploymentHandler::WithReasonableDefaults>. Also, this class
117 is special in that it applies either
118 L<DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions> or
119 L<DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions> depending on