DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::ScriptHelpers
use DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::ScriptHelpers 'schema_from_schema_loader'; schema_from_schema_loader({ naming => 'v4' }, sub { my ($schema, $version_set) = @_; ... });
This package is a set of coderef transforms for common use-cases in migrations. The subroutines are simply helpers for creating coderefs that will work for "PERL SCRIPTS" in DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator, yet have some argument other than the current schema that you as a user might prefer.
dbh(sub { my ($dbh, $version_set) = @_; ... });
For those times when you almost exclusively need access to "the bare metal". Simply gives you the correct database handle and the expected version set.
schema_from_schema_loader({ naming => 'v4' }, sub { my ($schema, $version_set) = @_; ... });
Any time you write a perl migration script that uses a DBIx::Class::Schema you should probably use this. Otherwise you'll run into problems if you remove a column from your schema yet still populate to it in an older population script.
Note that $sl_opts requires that you specify something for the naming option.
$sl_opts
naming
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
This software is copyright (c) 2012 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.
To install DBIx::Class::DeploymentHandler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::DeploymentHandler
CPAN shell
perl -MCPAN -e shell install DBIx::Class::DeploymentHandler
For more information on module installation, please visit the detailed CPAN module installation guide.