don't index x_count if we see it
authorJason Etheridge <jason@equinoxinitiative.org>
Thu, 16 Apr 2020 14:38:14 +0000 (10:38 -0400)
committerJason Etheridge <jason@equinoxinitiative.org>
Thu, 16 Apr 2020 14:38:14 +0000 (10:38 -0400)
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org>

kmig.d/bin/csv2mysql

index 6359c8c..bb2bba1 100755 (executable)
@@ -105,7 +105,7 @@ sub write_sql_table {
     push @indices, 'x_migrate';
        foreach my $column (@{ $info }) {
                my $cn = $column->{'header'};
-               if ($cn =~ /^x_/) {
+               if ($cn =~ /^x_/ && $cn ne 'x_count') {
                        push @indices, $cn;
                }
                my $col_info = Dumper($column);