primary key fix for YAML
Justin Hunter [Wed, 27 Jan 2010 04:36:16 +0000 (20:36 -0800)]
lib/SQL/Translator/Parser/DDL/YAML.pm

index 52ad3d0..74b28cc 100644 (file)
@@ -46,7 +46,7 @@ role SQL::Translator::Parser::DDL::YAML {
 
                 my $column = Column->new($fdata);
                 $table->add_column($column);
-                $table->primary_key($column->name) if $fdata->{is_primary_key};
+                $column->is_primary_key(1) if $fdata->{is_primary_key};
             }
     
             for my $idata ( @{ $tdata->{'indices'} || [] } ) {