Branch Coverage

blib/lib/SQL/Translator/Diff.pm
Criterion Covered Total %
branch 69 84 82.1


line true false branch
107 0 44 if ($args->{$deprecated})
116 3 19 if (not $self->output_db)
129 0 22 if $@
131 14 8 if (my $preprocess = $producer_class->can("preprocess_schema"))
148 10 56 if (my $old_name = $tar_table->extra('renamed_from')) { }
150 10 0 if ($src_table) { }
160 11 55 unless ($src_table)
168 0 55 if $self->case_insensitive
185 0 68 if $self->case_insensitive
188 13 55 unless $src_tables_checked{$src_table_name}
204 0 19 if $@
221 15 4 if (not $self->no_batch_alters and my $batch_alter = $producer_class->can('batch_alter_table')) { }
249 0 40 unless $flattened_diffs{$_}
22 18 if (@{[] unless $flattened_diffs{$_};}) { }
253 29 1 $_ ? :
9 22 ref $_ eq 'ARRAY' ? :
254 3 0 $self->ignore_missing_methods ? :
19 3 $meth ? :
272 9 10 if (my(@tables) = @{$self->tables_to_create;})
290 8 11 unless $self->{'tables_to_drop'}
11 8 if (my(@tables_to_drop) = @{[] unless $self->{'tables_to_drop'};})
293 0 0 $self->ignore_missing_methods ? :
11 0 $meth ? :
299 15 4 if (@diffs) { }
306 19 0 if (@diffs)
307 2 17 unless ($self->output_db =~ /^(?:MySQL|SQLite|PostgreSQL)$/)
312 2 187 $_ =~ /;\s*\z/msx ? :
189 0 $_ ? :
315 1 18 wantarray ? :
328 9 7 if ($i_tar->equals($i_src, $self->case_insensitive, $self->ignore_index_names))
338 5 7 if not $self->ignore_index_names and $checked_indices{$i_src}
340 4 7 if $i_src->equals($i_tar, $self->case_insensitive, $self->ignore_index_names)
358 75 105 if ($c_tar->equals($c_src, $self->case_insensitive, $self->ignore_constraint_names))
373 59 20 if not $self->ignore_constraint_names and $checked_constraints{$c_src}
375 16 70 if $c_src->equals($c_tar, $self->case_insensitive, $self->ignore_constraint_names)
392 9 191 if (my $old_name = $tar_table_field->extra->{'renamed_from'})
394 9 0 if ($src_table_field) { }
406 26 165 unless ($src_table_field)
414 48 0 unless ($tar_table_field->equals($src_table_field, $self->case_insensitive) or $tar_table_field->equals($src_table_field->parsed_field, $self->case_insensitive) or $tar_table_field->parsed_field->equals($src_table_field, $self->case_insensitive) or $tar_table_field->parsed_field->equals($src_table_field->parsed_field, $self->case_insensitive))
429 9 179 if $renamed_source_fields{$f_src_name}
433 14 165 unless ($tar_table_field)
454 9 46 unless $src_table->_compare_objects(\@src_opts, \@tar_opts)