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 =~ /^([^=]+)=(.+)$/) { } |
120
|
0 |
5 |
if $help |
121
|
0 |
5 |
if scalar @input > 2 |
122
|
0 |
5 |
unless @input |
124
|
0 |
5 |
if (my $interactive = -t STDIN && -t STDOUT) |
136
|
0 |
5 |
if ($list) |
142
|
0 |
5 |
if @input > 2 |
151
|
0 |
10 |
unless -r $file |
152
|
0 |
10 |
unless $valid_parsers{$parser} |
156
|
0 |
10 |
unless $t->parser($parser) |
157
|
0 |
10 |
unless my $out = $t->translate($file) |
159
|
10 |
0 |
unless ($schema->name) |
163
|
5 |
5 |
if ($i == 1) { } |
182
|
0 |
11 |
if $debug |
183
|
1 |
10 |
unless ($t2) |
184
|
0 |
1 |
if $debug |
186
|
0 |
1 |
if ($target_db =~ /(SQLServer|Oracle)/) |
188
|
0 |
0 |
if $constraint->type ne "FOREIGN KEY" |
206
|
4 |
0 |
if ($key1 eq $key2) |
207
|
0 |
4 |
if (defined $value1 != defined $value2) |
211
|
1 |
3 |
if (defined $value1 and $value1 ne $value2) |
223
|
9 |
1 |
unless ($options_different) |
226
|
3 |
0 |
if $checkedOptions{$key} |
233
|
1 |
9 |
if ($options_different) |
237
|
1 |
0 |
defined $value ? : |
254
|
0 |
42 |
if $debug |
258
|
3 |
39 |
unless ($t2_field) |
259
|
0 |
3 |
if $debug |
262
|
0 |
0 |
if ($target_db =~ /SQLServer/ and not $f1_nullable and not defined $f1_default) |
267
|
0 |
0 |
grep(($_ eq $f1_type), @numeric_types) ? : |
269
|
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/ ? : |
281
|
0 |
3 |
if ($temp_default_value) |
310
|
6 |
33 |
unless ($t1_field->equals($t2_field, $case_insensitive)) |
312
|
0 |
6 |
if ($target_db =~ /SQLServer/ and $f2_type eq "timestamp") |
314
|
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/ ? : |
329
|
0 |
6 |
$target_db =~ /Oracle/ ? : |
|
0 |
6 |
$target_db =~ /SQLServer/ ? : |
331
|
3 |
3 |
$f1_nullable ? : |
332
|
0 |
6 |
if $target_db =~ /Oracle/ and $f1_nullable == $f2_nullable |
333
|
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/ ? : |
345
|
0 |
6 |
if (defined $f1_default and $target_db =~ /SQLServer/) |
348
|
0 |
0 |
uc $f1_default eq 'CURRENT_TIMESTAMP' ? : |
|
0 |
0 |
uc $f1_default eq 'NULL' ? : |
353
|
0 |
0 |
uc $f1_default eq 'CURRENT_TIMESTAMP' ? : |
|
0 |
0 |
uc $f1_default eq 'NULL' ? : |
366
|
1 |
1 |
if ($i1->equals($i2, $case_insensitive)) |
371
|
0 |
1 |
$i1->type eq 'NORMAL' ? : |
|
1 |
0 |
$i1->name ? : |
381
|
1 |
1 |
if $checked_indices{$i2} |
383
|
0 |
1 |
if $i2->equals($i1, $case_insensitive) |
385
|
0 |
1 |
$target_db =~ /SQLServer/ ? : |
393
|
0 |
2 |
if $source_db =~ /Oracle/ and $c1->type eq "UNIQUE" and $c1->name =~ /^SYS_/i |
395
|
17 |
25 |
if ($c1->equals($c2, $case_insensitive)) |
405
|
17 |
5 |
if $checked_constraints{$c2} |
407
|
0 |
13 |
if $c2->equals($c1, $case_insensitive) |
409
|
1 |
4 |
if ($c2->type eq 'UNIQUE') { } |
|
0 |
4 |
elsif ($target_db =~ /SQLServer/) { } |
415
|
3 |
1 |
$c2->type eq 'FOREIGN KEY' ? : |
429
|
1 |
10 |
unless ($t1) |
430
|
0 |
1 |
if ($target_db =~ /SQLServer/) |
432
|
0 |
0 |
if $constraint->type eq "PRIMARY KEY" |
443
|
2 |
39 |
unless ($t1_field) |
444
|
0 |
2 |
$target_db =~ /SQLServer/ ? : |
450
|
1 |
4 |
if (@new_tables) |
458
|
3 |
2 |
if (@diffs) |
459
|
1 |
2 |
unless ($source_db =~ /^(MySQL|SQLServer|Oracle)$/) |
464
|
3 |
2 |
if (@diffs) { } |
476
|
0 |
5 |
unless my $schema = shift() |
477
|
1 |
4 |
unless my(@fields) = $c->field_names |
479
|
0 |
4 |
if ($c->type eq 'PRIMARY KEY') { } |
|
2 |
2 |
elsif ($c->type eq 'UNIQUE') { } |
|
2 |
0 |
elsif ($c->type eq 'FOREIGN KEY') { } |
480
|
0 |
0 |
if ($target_db =~ /Oracle/) { } |
481
|
0 |
0 |
defined $c->name ? : |
488
|
0 |
2 |
if ($target_db =~ /Oracle/) { } |
489
|
0 |
0 |
defined $c->name ? : |
492
|
2 |
0 |
defined $c->name ? : |
499
|
0 |
6 |
unless $_ |
506
|
0 |
2 |
unless $_ |
507
|
0 |
2 |
unless (@rfields) |
509
|
0 |
0 |
if (my $ref_table = $schema->get_table($rtable_name)) { } |
518
|
2 |
0 |
if (@rfields) { } |
526
|
0 |
2 |
if ($c->match_type) |
527
|
0 |
0 |
' MATCH ' . $c->match_type =~ /full/i ? : |
531
|
1 |
1 |
if ($c->on_delete) |
535
|
0 |
2 |
if ($c->on_update) |