$field->comments($fdata->{comments});
$table->add_column($field);
- $table->primary_key( $field->name ) if $fdata->{'is_primary_key'};
+ $field->is_primary_key(1) if $fdata->{is_primary_key};
my %extra;
for my $qual ( qw[ binary unsigned zerofill list collate ],
$field->comments($fdata->{comments});
$table->add_column($field);
- $table->primary_key($field->name) if $fdata->{is_primary_key};
+ $field->is_primary_key(1) if $fdata->{is_primary_key};
for my $cdata ( @{ $fdata->{constraints} } ) {
next unless lc $cdata->{type} eq 'foreign_key';
my $field = Column->new(%fdata);
$table->add_column($field);
- $table->primary_key( $field->name ) if $fdata{'is_primary_key'};
+ $field->is_primary_key(1) if $fdata{is_primary_key};
#
# TODO: