Branch Coverage

blib/lib/Mojo/SQLite/Migrations.pm
Criterion Covered Total %
branch 32 36 88.8


line true false branch
32 31 42 if $line =~ /^\s*--\s*(\d+)\s*(up|down)/iu
33 73 0 if $version
40 4 28 unless (sort {$a <=> $b;} keys %{(shift())->{'migrations'}{'up'};})[-1]
50 1 22 if $target != 0 and not $up->{$target}
54 2 20 if $self->_active($db, 1) == $target
58 0 20 if (my $active = $self->_active($db, 1)) == $target
61 2 18 if $active > $latest
75 1 17 unless eval { do { $result = $db->dbh->do($query); 1 } }
76 1 17 if $errored
82 1 17 if $errored
83 0 17 unless defined $result
85 17 0 if $db->query('update mojo_migrations set version = ? where name = ?', $target, $self->name)
96 12 11 if ($from < $to)
97 29 5 if $_ <= $to
102 19 6 if $_ > $to
116 61 2 $results ? :
117 57 6 if ($next or not $create)
120 1 5 if not $results or $results->sth->err