[Dbix-class] AUTO_INCREMENT missing in generated sql file
Ash Berlin
ash_cpan at firemirror.com
Sat Mar 3 19:13:07 GMT 2007
isaac-dbix at deeproot.co.in wrote:
>
> I have been trying to generate sql from the schemas using the following
>
> print $schema->storage->deployment_statements($schema, 'MySQL');
>
> It does generate the sql. The only problem is that the resulting sql
> does not have AUTO_INCREMENT set for the id field(primary key).
>
> The schemas do have the PK::Auto (or PK::Auto::MySQL) components
> loaded and id column is set as a primary key.
>
> Is there something else that I need to do, in order that the resulting
> sql contains AUTO_IMCREMENT for the id(with primary key) ?
I'll assume you are specifying the is_auto_increment attribute on the
columns in the ResultSource (table) class.
If you have, then examine the SQL::Translator::Parser::DBIx::Class (in
the DBIC tarball) and SQL::Translator::Producer::MySQL to see if it does
anything with the above attribute.
Ash
More information about the Dbix-class
mailing list