From: Justin Hunter Date: Wed, 27 Jan 2010 04:36:16 +0000 (-0800) Subject: primary key fix for YAML X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=72884995c859dd41f5cff5a4d4d4ce455c0c8ab8;p=dbsrgits%2FSQL-Translator-2.0-ish.git primary key fix for YAML --- diff --git a/lib/SQL/Translator/Parser/DDL/YAML.pm b/lib/SQL/Translator/Parser/DDL/YAML.pm index 52ad3d0..74b28cc 100644 --- a/lib/SQL/Translator/Parser/DDL/YAML.pm +++ b/lib/SQL/Translator/Parser/DDL/YAML.pm @@ -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'} || [] } ) {