line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::SimpleMigration::Client::SQLite; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use parent qw(DBIx::SimpleMigration::Client); |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub _migrations_table_exists { |
8
|
1
|
|
|
1
|
|
1
|
my ($self) = @_; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
|
|
1
|
my $query = " |
11
|
|
|
|
|
|
|
SELECT EXISTS ( |
12
|
|
|
|
|
|
|
SELECT NULL |
13
|
|
|
|
|
|
|
FROM sqlite_master |
14
|
|
|
|
|
|
|
WHERE type = 'table' AND name = ? |
15
|
|
|
|
|
|
|
) |
16
|
|
|
|
|
|
|
"; |
17
|
|
|
|
|
|
|
|
18
|
1
|
50
|
|
|
|
9
|
my $row = $self->{dbh}->selectrow_hashref($query, {}, $self->{_options}->{migrations_table}) or die 'Database error: ' . $self->{dbh}->errstr; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
742
|
return $row->{exists}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |