From: Justin Hunter Date: Wed, 22 Sep 2010 15:05:45 +0000 (-0700) Subject: formatting fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d112909f77db57e6cf0948ce0ee5e0323157ee4;p=dbsrgits%2FSQL-Translator-2.0-ish.git formatting fixes --- diff --git a/lib/SQL/Translator/Parser/DDL/SQLite.pm b/lib/SQL/Translator/Parser/DDL/SQLite.pm index 5c959b5..5fc6d34 100644 --- a/lib/SQL/Translator/Parser/DDL/SQLite.pm +++ b/lib/SQL/Translator/Parser/DDL/SQLite.pm @@ -42,7 +42,7 @@ role SQL::Translator::Parser::DDL::SQLite { for my $table_name ( @tables ) { my $tdata = $result->{tables}{ $table_name }; - my $table = Table->new({ name => $tdata->{name}, schema => $schema }); + my $table = Table->new({ name => $tdata->{name}, schema => $schema }); $table->comments( $tdata->{comments}->flatten ) if $tdata->{comments}; $schema->add_table($table); @@ -58,10 +58,10 @@ role SQL::Translator::Parser::DDL::SQLite { comments => $fdata->{comments}, table => $table, }); + $table->add_column($field); - $table->primary_key( $field->name ) if $fdata->{is_primary_key}; - + for my $cdata ( @{ $fdata->{constraints} } ) { next unless $cdata->{type} eq 'foreign_key'; $cdata->{fields} ||= [ $field->name ];