make sure we are comparing against lowercase
Justin Hunter [Sat, 5 Sep 2009 16:48:07 +0000 (09:48 -0700)]
lib/SQL/Translator/Parser/DDL/PostgreSQL.pm

index cceb5b6..ed7f446 100644 (file)
@@ -60,7 +60,7 @@ role SQL::Translator::Parser::DDL::PostgreSQL {
                 $table->primary_key($field->name) if $fdata->{is_primary_key};
     
                 for my $cdata ( @{ $fdata->{constraints} } ) {
-                    next unless $cdata->{type} eq 'foreign_key';
+                    next unless lc $cdata->{type} eq 'foreign_key';
                     $cdata->{fields} ||= [ $field->name ];
                     push @{ $tdata->{constraints} }, $cdata;
                 }