package SQL::Translator::Parser::YAML;
# -------------------------------------------------------------------
-# $Id: YAML.pm,v 1.2 2003-10-08 22:44:52 kycl4rk Exp $
+# $Id: YAML.pm,v 1.3 2003-10-09 21:48:55 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 darren chamberlain <darren@cpan.org>,
# Ken Y. Clark <kclark@cpan.org>.
use strict;
use vars qw($VERSION);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
use SQL::Translator::Schema;
use SQL::Translator::Utils qw(header_comment);
for my $fdata ( @fields ) {
$table->add_field( %$fdata ) or die $table->error;
+ $table->primary_key( $fdata->{'name'} )
+ if $fdata->{'is_primary_key'};
}
}