make the straight listing of rows for the file optional via --list
[migration-tools.git] / emig.d / bin / mig-quicksheet
index ddc260f..76d227e 100755 (executable)
@@ -59,12 +59,14 @@ use EMig;
 my $outtable = '';
 my $outfile = '';
 my $force;
+my $list;
 my $drop;
 my $help;
 
 GetOptions(
        'outtable=s' => \$outtable,
        'outfile=s' => \$outfile,
+    'list' => \$list,
        'force' => \$force,
        'drop' => \$drop,
        'help|?' => \$help
@@ -286,7 +288,7 @@ sub write_worksheets {
         };
     }
 
-    handle_list();
+    handle_list() if $list;
     handle_columns();
 
     if ($outfile) {
@@ -410,7 +412,7 @@ sub handle_columns {
                     ,$cdata->{max_length}
                 ) . ');') || die "Error inserting into subtable $MIGSCHEMA.\"$first_table\": $!";
             }
-            if ($cdata->{distinct_value_count} > 1 && $cdata->{distinct_value_count} <= 65530) {
+            if ($cdata->{distinct_value_count} > 1 && $cdata->{distinct_value_count} <= 500) {
                 group_by($column);
             }
         }