The keyseqs from $dbh->foreign_key_info from DBD::Pg were erroneously
high, and since they are used as an array index, they were causing the
fk_info to return undefs and break everything.
Add a grep defined, to the column arrays in fk_info which fixes
everything.
Revision history for Perl extension DBIx::Class::Schema::Loader
+ - work around broken keyseq in DBD::Pg foreign_key_info (RT#77062)
+
0.07023 2012-05-05 11:44:15
- properly order FK columns when using base ::DBI loader (SineSwiper)
- bump Class::Inspector dep to 1.27 due to test failures with earlier
my @rels;
foreach my $relid (keys %rels) {
push(@rels, {
- remote_columns => $rels{$relid}{rcols},
- local_columns => $rels{$relid}{lcols},
+ remote_columns => [ grep defined, @{ $rels{$relid}{rcols} } ],
+ local_columns => [ grep defined, @{ $rels{$relid}{lcols} } ],
remote_table => $rels{$relid}->{tbl},
});
}