line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::SchemaChecksum::App; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Manage your datebase schema via checksums |
4
|
|
|
|
|
|
|
our $VERSION = '1.103'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
2792
|
use 5.010; |
|
4
|
|
|
|
|
17
|
|
7
|
4
|
|
|
4
|
|
2352
|
use MooseX::App 1.21 qw(Config ConfigHome); |
|
4
|
|
|
|
|
310574
|
|
|
4
|
|
|
|
|
29
|
|
8
|
|
|
|
|
|
|
extends qw(DBIx::SchemaChecksum); |
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
1749715
|
use DBI; |
|
4
|
|
|
|
|
42438
|
|
|
4
|
|
|
|
|
910
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
option 'dsn' => ( |
13
|
|
|
|
|
|
|
isa => 'Str', |
14
|
|
|
|
|
|
|
is => 'ro', |
15
|
|
|
|
|
|
|
required => 1, |
16
|
|
|
|
|
|
|
documentation => q[DBI Data Source Name] |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
option 'user' => ( |
19
|
|
|
|
|
|
|
isa => 'Str', |
20
|
|
|
|
|
|
|
is => 'ro', |
21
|
|
|
|
|
|
|
documentation => q[username to connect to database] |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
option 'password' => ( |
24
|
|
|
|
|
|
|
isa => 'Str', |
25
|
|
|
|
|
|
|
is => 'ro', |
26
|
|
|
|
|
|
|
documentation => q[password to connect to database] |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
option [qw(+catalog +schemata +driveropts)] => (); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has '+dbh' => ( lazy_build => 1 ); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _build_dbh { |
33
|
5
|
|
|
5
|
|
13
|
my $self = shift; |
34
|
5
|
|
|
|
|
208
|
return DBI->connect( |
35
|
|
|
|
|
|
|
$self->dsn, $self->user, $self->password, |
36
|
|
|
|
|
|
|
{ RaiseError => 1 } # TODO: set dbi->connect opts via App |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
DBIx::SchemaChecksum::App - Manage your datebase schema via checksums |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 1.103 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Manage your datebase schema via checksums |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=over |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item * Use C<checksum> to calculate the current checksum of your database. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item * Use C<new_changes_file> to generate a new db update script based on the current checksum. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item * Use C<apply_changes> to apply all update scripts starting from the current checksum. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=back |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
For more background information, check out the man-page via C<perldoc DBIx::SchemaChecksum> or on L<https://metacpan.org/pod/DBIx::SchemaChecksum> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHORS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=over 4 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item * |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Thomas Klausner <domm@plix.at> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item * |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Maroš Kollár <maros@cpan.org> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item * |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Klaus Ita <koki@worstofall.com> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=back |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This software is copyright (c) 2012 - 2021 by Thomas Klausner, Maroš Kollár, Klaus Ita. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
96
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |