Branch Coverage

blib/lib/Alzabo/RDBMSRules.pm
Criterion Covered Total %
branch 0 64 0.0


line true false branch
22 0 0 if $@
181 0 0 unless $$self{'state'}{'deferred_sql'}
203 0 0 if $index->unique
210 0 0 if (defined $index->function) { }
280 0 0 if ($new_sql ne $self->index_sql($p{'old'}))
411 0 0 if (defined $new_t->former_name)
418 0 0 if ($old_t) { }
420 0 0 if ($old_t->name ne $new_t->name)
424 0 0 if ($self->can_alter_table_name) { }
447 0 0 if (my $e = 'Exception::Class'->caught('Alzabo::Exception::RDBMSRules::RecreateTable')) { }
0 0 elsif ($e = $@) { }
470 0 0 unless ($changed_name{$old_t->name} or eval { do { $p{'new'}->table($old_t->name) } })
477 0 0 unless $$self{'state'}{'deferred_sql'}
491 0 0 unless (eval { do { $p{'new'}->index($old_i->id) } })
494 0 0 if eval { do { $p{'new'}->columns(map({$_->name;} $old_i->columns)) } } and not $@
501 0 0 if defined $new_c->former_name and $new_c->former_name ne $new_c->name
507 0 0 unless ($changed_name{$old_c->name} or my $new_c = eval { do { $p{'new'}->column($old_c->name) } })
521 0 0 if (defined $new_c->former_name)
528 0 0 if ($old_c) { }
530 0 0 if ($old_c->name ne $new_c->name)
532 0 0 if ($self->can_alter_column_name) { }
556 0 0 if (my $old_i = eval { do { $p{'old'}->index($new_i->id) } }) { }
569 0 0 unless (grep {$new_fk->id eq $_->id;} $p{'old'}->all_foreign_keys)
577 0 0 unless (grep {$old_fk->id eq $_->id;} $p{'new'}->all_foreign_keys)
586 0 0 if $changed_name{$old_pk->name}
589 0 0 unless ($new_col and $new_col->is_primary_key)
599 0 0 unless ($pk_changed)
605 0 0 if $new_pk->former_name and $changed_name{$new_pk->former_name}
607 0 0 unless ($old_col and $old_col->is_primary_key)
620 0 0 unless ($p{'old'}->has_attribute('attribute', $new_att, 'case_sensitive', 1))
632 0 0 unless ($alter_attributes)
636 0 0 unless ($p{'new'}->has_attribute('attribute', $old_att, 'case_sensitive', 1))