Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 65632
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: hanenkamp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08190-TRIAL
Fixed in: (no value)



Subject: SQL::Translator::Parser::DBIx::Class loses auto_increment
Download (untitled) / with headers
text/plain 869b
This is easy to fix. Basically, the SQLT parser assumes that the column_info in ResultSource returns the same fields as used by SQLT. However, DBIC uses auto_increment and SQLT uses is_auto_increment. The fix is a two or three line change to make sure is_auto_increment => $column_info-> {auto_increment} when creating the SQLT schema objects. The work around, in the meantime, is to do something like this when writing a deployment script: # HACK!! SQL::Translator::Parser::DBIx::Class does not correctly handle # auto_increment. This fixes that... for my $name ($schema->sources) { my $source = $schema->source($name); for my $col ($source->columns) { $source->_columns->{$col}{is_auto_increment} = $source->_columns->{$col}{auto_increment}; } } $schema->deploy({ add_drop_table => 1 });
Download (untitled) / with headers
text/plain 428b
On Thu Feb 10 18:10:29 2011, HANENKAMP wrote: Show quoted text
> This is easy to fix. Basically, the SQLT parser assumes that the > column_info in ResultSource > returns the same fields as used by SQLT. However, DBIC uses > auto_increment
^^ what makes you think this? Nowhere in documentation nor code do I see references to auto_increment, everything is is_auto_increment. Rejecting ticket, but feel free to reopen it if I missed something.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.