Branch Coverage

script/sqlt-diff-old
Criterion Covered Total %
branch 117 218 53.6


line true false branch
103 0 10 if ($arg =~ /^-?-l(ist)?$/) { }
0 10 elsif ($arg =~ /^-?-h(elp)?$/) { }
0 10 elsif ($arg =~ /^-?-d(ebug)?$/) { }
10 0 elsif ($arg =~ /^([^=]+)=(.+)$/) { }
116 0 5 if $help
117 0 5 if scalar @input > 2
118 0 5 unless @input
120 0 5 if (my $interactive = -t STDIN && -t STDOUT)
132 0 5 if ($list)
138 0 5 if @input > 2
147 0 10 unless -r $file
148 0 10 unless $valid_parsers{$parser}
152 0 10 unless $t->parser($parser)
153 0 10 unless my $out = $t->translate($file)
155 10 0 unless ($schema->name)
159 5 5 if ($i == 1) { }
177 0 11 if $debug
178 1 10 unless ($t2)
179 0 1 if $debug
181 0 1 if ($target_db =~ /(SQLServer|Oracle)/)
183 0 0 if $constraint->type ne "FOREIGN KEY"
200 4 0 if ($key1 eq $key2)
201 0 4 if (defined $value1 != defined $value2)
205 1 3 if (defined $value1 and $value1 ne $value2)
218 9 1 unless ($options_different)
221 3 0 if $checkedOptions{$key}
229 1 9 if ($options_different)
233 1 0 defined $value ? :
250 0 42 if $debug
254 3 39 unless ($t2_field)
255 0 3 if $debug
258 0 0 if ($target_db =~ /SQLServer/ and not $f1_nullable and not defined $f1_default)
265 0 0 grep(($_ eq $f1_type), @numeric_types) ? :
267 0 3 $target_db =~ /Oracle/ ? :
1 2 $f1_size && !($f1_type =~ /(blob|text)$/) ? :
0 2 uc $f1_default eq 'CURRENT_TIMESTAMP' ? :
0 2 uc $f1_default eq 'NULL' ? :
1 2 !defined($f1_default) ? :
3 0 $f1_nullable ? :
0 3 $f1_auto_inc ? :
0 3 $target_db =~ /Oracle/ ? :
283 0 3 if ($temp_default_value)
313 6 33 unless ($t1_field->equals($t2_field, $case_insensitive))
316 0 6 if ($target_db =~ /SQLServer/ and $f2_type eq "timestamp")
318 0 0 $target_db =~ /Oracle/ ? :
0 0 $f1_size && !($f1_type =~ /(blob|text)$/) ? :
0 0 uc $f1_default eq 'CURRENT_TIMESTAMP' ? :
0 0 uc $f1_default eq 'NULL' ? :
0 0 !defined($f1_default) ? :
0 0 $f1_nullable ? :
0 0 $f1_auto_inc ? :
0 0 $target_db =~ /Oracle/ ? :
338 0 6 $target_db =~ /Oracle/ ? :
0 6 $target_db =~ /SQLServer/ ? :
342 3 3 $f1_nullable ? :
343 0 6 if $target_db =~ /Oracle/ and $f1_nullable == $f2_nullable
345 4 2 $target_db =~ /MySQL/ ? :
4 2 $f1_size && !($f1_type =~ /(blob|text)$/) ? :
0 3 uc $f1_default eq 'CURRENT_TIMESTAMP' ? :
0 3 uc $f1_default eq 'NULL' ? :
3 3 !defined($f1_default) || $target_db =~ /SQLServer/ ? :
1 5 $f1_auto_inc ? :
0 6 $target_db =~ /Oracle/ ? :
362 0 6 if (defined $f1_default and $target_db =~ /SQLServer/)
366 0 0 uc $f1_default eq 'CURRENT_TIMESTAMP' ? :
0 0 uc $f1_default eq 'NULL' ? :
377 0 0 uc $f1_default eq 'CURRENT_TIMESTAMP' ? :
0 0 uc $f1_default eq 'NULL' ? :
395 1 1 if ($i1->equals($i2, $case_insensitive))
400 0 1 $i1->type eq 'NORMAL' ? :
1 0 $i1->name ? :
410 1 1 if $checked_indices{$i2}
412 0 1 if $i2->equals($i1, $case_insensitive)
414 0 1 $target_db =~ /SQLServer/ ? :
424 0 2 if $source_db =~ /Oracle/ and $c1->type eq "UNIQUE" and $c1->name =~ /^SYS_/i
428 17 25 if ($c1->equals($c2, $case_insensitive))
437 17 5 if $checked_constraints{$c2}
439 0 13 if $c2->equals($c1, $case_insensitive)
441 1 4 if ($c2->type eq 'UNIQUE') { }
0 4 elsif ($target_db =~ /SQLServer/) { }
446 3 1 $c2->type eq 'FOREIGN KEY' ? :
460 1 10 unless ($t1)
461 0 1 if ($target_db =~ /SQLServer/)
463 0 0 if $constraint->type eq "PRIMARY KEY"
474 2 39 unless ($t1_field)
475 0 2 $target_db =~ /SQLServer/ ? :
481 1 4 if (@new_tables)
489 3 2 if (@diffs)
490 1 2 unless ($source_db =~ /^(MySQL|SQLServer|Oracle)$/)
495 3 2 if (@diffs) { }
504 0 5 unless my $schema = shift()
505 1 4 unless my(@fields) = $c->field_names
507 0 4 if ($c->type eq 'PRIMARY KEY') { }
2 2 elsif ($c->type eq 'UNIQUE') { }
2 0 elsif ($c->type eq 'FOREIGN KEY') { }
508 0 0 if ($target_db =~ /Oracle/) { }
509 0 0 defined $c->name ? :
514 0 2 if ($target_db =~ /Oracle/) { }
515 0 0 defined $c->name ? :
517 2 0 defined $c->name ? :
520 0 6 unless $_
526 0 2 unless $_
527 0 2 unless (@rfields)
529 0 0 if (my $ref_table = $schema->get_table($rtable_name)) { }
536 2 0 if (@rfields) { }
542 0 2 if ($c->match_type)
543 0 0 ' MATCH ' . $c->match_type =~ /full/i ? :
546 1 1 if ($c->on_delete)
550 0 2 if ($c->on_update)