Revert last change becuase it broke a bunch of tests.
Darren Chamberlain [Tue, 11 Jan 2011 21:41:43 +0000 (21:41 +0000)]
lib/SQL/Translator/Producer/SQLite.pm

index d7d3816..2e7aa6a 100644 (file)
@@ -234,9 +234,6 @@ sub create_table
     #
     my $c_name_default = 'A';
     for my $c ( $table->get_constraints ) {
-        if ($c->type eq "FOREIGN KEY") {
-            push @field_defs, create_foreignkey($c);
-        }
         next unless $c->type eq UNIQUE; 
         push @constraint_defs, create_constraint($c);
     }
@@ -246,15 +243,6 @@ sub create_table
     return (@create, $create_table, @index_defs, @constraint_defs );
 }
 
-sub create_foreignkey {
-    my $c = shift;
-    
-    my $fk_sql = "FOREIGN KEY(".$c->{fields}[0].") REFERENCES ";
-    $fk_sql .= $c->{reference_table}."(".$c->{reference_fields}[0].")";
-    
-    return $fk_sql;
-}
-
 sub create_field
 {
     my ($field, $options) = @_;