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/Sche
ma.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/Stor
age/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

 

 

From: Hermida, Leandro [mailto:[email protected]] 
Sent: Sunday, May 24, 2009 16:46
To: [email protected]
Subject: [Dbix-class] how to set advanced SQL::Translator arguments
properlyin schema deploy() method

 

Hello,

 

I am having trouble understanding how to set the more advanced SQLT
arguments correctly in the $schema->deploy() method.   In particular,
how does one set the SQL::Translator::Producer mysql_version argument
via $schema->deploy()?  My issue is that no matter what I try it keeps
turning any DBIx::Class column data_type VARCHAR with a size greater
than 255 to a TEXT field and I want to tell it that I have MySQL 5.0.xx
which has much longer varchars. 

 

Thanks for any help,

Leandro

 

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to