Skip Menu |

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 58420
Status: new
Priority: 0/
Queue: SQL-Translator

Owner: Nobody in particular
Requestors: (no email address)

Bug Information
Severity: Normal
Broken in: 0.11006
Fixed in: (no value)


Subject: Producer::PostgreSQL: bug with is_auto_increment and size
Download (untitled) / with headers
text/plain 388b
Producer::PostgreSQL looks at the size property to determine whether to output "bigserial" or "serial" for an auto-increment column. If size is not present for some reason (hint: DBIx::Class::Schema::Loader omits it for all fixed-size numeric types), then it always outputs "serial", even if the original column type was "bigint". Better option is to look for "bigint". Patch provided.
Subject: perl-SQL-Translator-0.11006-pg-bigserial.patch
diff -ru SQL-Translator-0.11006-orig/lib/SQL/Translator/Producer/ SQL-Translator-0.11006/lib/SQL/Translator/Producer/ --- SQL-Translator-0.11006-orig/lib/SQL/Translator/Producer/ 2010-06-03 03:54:59.000000000 -0500 +++ SQL-Translator-0.11006/lib/SQL/Translator/Producer/ 2010-06-15 07:37:47.645976941 -0500 @@ -662,7 +662,7 @@ $data_type = 'character varying'; } elsif ( $field->is_auto_increment ) { - if ( defined $size[0] && $size[0] > 11 ) { + if ( $data_type eq 'bigint' ) { $data_type = 'bigserial'; } else {

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

Please report any issues with to