[Dbix-class] how to set advanced SQL::Translator
arguments properlyin schema deploy() method
Peter Rabbitson
rabbit+dbic at rabbit.us
Mon Jun 1 10:24:59 GMT 2009
Hermida, Leandro wrote:
> Hello,
>
>
>
> Figured it out by looking into the DBIx::Class code, the documentation
> for the schema convenience method for deployment_statements
> http://search.cpan.org/~ribasushi/DBIx-Class-0.08103/lib/DBIx/Class/Schema.pm#deployment_statements
> needs to be updated as the parameter list has grown/changed. The
> parameter list is correctly shown in the storage documentation
> http://search.cpan.org/~ribasushi/DBIx-Class-0.08103/lib/DBIx/Class/Storage/DBI.pm#deployment_statements.
>
>
>
> For those new users to deploy() and deployment_statements() a working
> example would be:
>
>
>
> my $sqlt_args = { show_warnings => 1, producer_args => { mysql_version
> => ‘5.0.51’ } };
>
> $schema->deploy($sqlt_args);
>
> my $ddl_statements = $schema->deployment_statements(undef, undef, undef,
> $sqlt_args);
>
>
>
> Leandro
Whoops, that's indeed an oversight in the docs. Fixed by:
http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=6474
More information about the DBIx-Class
mailing list