NAME

DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated - (DEPRECATED) Use this if you are stuck in the past

DESCRIPTION

All this module does is override a few parts of DBIx::Class::DeployMethd::SQL::Translator so that the files generated with DBIx::Class::Schema::Versioned will work with this out of the box.

DEPRECATED

I begrudgingly made this module (and other related modules) to keep porting from DBIx::Class::Schema::Versioned relatively simple. I will make changes to ensure that it works with output from DBIx::Class::Schema::Versioned etc, but I will not add any new features to it.

Once I hit major version 1 usage of this module will emit a warning. On version 2 it will be removed entirely.

THIS SUCKS

Yeah, this old Deprecated thing is a drag. It can't do downgrades, it can only use a single .sql file for migrations, it has no .pl support. You should totally switch! Here's how:

my $init_part = ref $schema;
$init_part =~ s/::/-/g;
opendir my $dh, 'sql';
for (readdir $dh) {
  if (/\Q$init_part\E-(.*)-(.*)(?:-(.*))?/) {
   if (defined $3) {
     cp $_, $dh->deploy_method->_ddl_schema_up_produce_filename($3, [$1, $2]);
   } else {
     cp $_, $dh->deploy_method->_ddl_schema_produce_filename($2, $1);
   }
 }
}

OVERRIDDEN METHODS

SEE ALSO

This class is an implementation of DBIx::Class::DeploymentHandler::HandlesDeploy. Pretty much all the documentation is there.

AUTHOR

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.