'number' => 'float',
'varchar' => 'text',
'text' => 'text',
+ 'serial' => 'number',
);
my $dbdef_table = dbdef_dist->table($table)
if ( $line =~ /^=item\s+field\s+-\s+description\s*$/ ) {
foreach my $column ( $dbdef_table->columns ) {
- print DEST "=item $column - ";
- print DEST "primary key"
- if $column eq $primary_key;
- print DEST "\n\n";
+ print DEST "=item $column\n\n";
+ if ( $column eq $primary_key ) {
+ print DEST "primary key\n\n";
+ } else {
+ print DEST "$column\n\n";
+ }
}
next;
open(TEST,">FS/t/$table.t") or die $!;
print TEST <<ENDTEST;
-BEGIN { \$| = 1; print "1..1\n" }
-END {print "not ok 1\n" unless \$loaded;}
+BEGIN { \$| = 1; print "1..1\\n" }
+END {print "not ok 1\\n" unless \$loaded;}
use FS::$table;
\$loaded=1;
-print "ok 1\n";
+print "ok 1\\n";
ENDTEST
close TEST;