bin/dbicx-backend-move

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/App/DBICx/Backend/Move.pm ↑ Summary blib/lib/DBICx/Backend/Move/SQLite.pm »
1 #!/usr/bin/env perl
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use App::DBICx::Backend::Move;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 App::DBICx::Backend::Move->run;
8  
9 =head1 NAME
10  
11 dbicx-backend-move - Cmdline tool around C<DBICx::Backend::Move>
12  
13 =head1 SYNOPSIS
14  
15 This is the command line tool for C<DBICx::Backend::Move>.
16 C<DBICx::Backend::Move> allows you to to move your database from one
17 backend to another. Imagine you have add your data in a MySQL database
18 and want to continue with a PostgreSQL database. Here is the tool for
19 you.
20  
21 $ dbicx-backend-move --schema 'MyApp::Schema' --from_dsn dbi:mysql:dbname=mydb --from_user user --from_pass pass --to_dsn dbi::pg::dbname=mydb --to_user user --to_pass pass --verbose --rawmode
22  
23  
24 Lets look at the options in detail:
25  
26 =head1 DESCRIPTION
27  
28  
29 =over 4
30  
31 =item --schema
32  
33 Required option. Name of the L<DBIx::Class> based schema description of
34 the source database. Therefore, it also will be the schema for the
35 destination database.
36  
37 =item --from_dsn
38  
39 Required option. This argument is the DSN to connect to the source
40 database. It will be passed to DBIx::Class::Schema->connect. For more
41 information see L<DBIx::Class::Storage::DBI/"connect_info">.
42  
43 =item --to_dsn
44  
45 Required option. This argument is the DSN to connect to the destination
46 database. It will be passed to DBIx::Class::Schema->connect. For more
47 information see L<DBIx::Class::Storage::DBI/"connect_info">.
48  
49 =item --from_user
50  
51 Optional option. This is the user name needed to connect to the source
52 database. If the option is not given, dbicx-backend-move will try to
53 determine it from the actual user. dbicx-backend-move without any
54 options will show you a usage message that contains the user name it
55 determined.
56  
57 =item --to_user
58  
59 Optional option. This is the user name needed to connect to the
60 destination database. If the option is not given, dbicx-backend-move
61 will try to determine it from the actual user. dbicx-backend-move
62 without any options will show you a usage message that contains the user
63 name it determined.
64  
65 =item --from_pass
66  
67 Optional option. This is the password needed to connect to the source
68 database. If this argument is not given dbicx-backend-move will assume
69 no password is needed.
70  
71 =item --to_pass
72  
73 Optional option. This is the password needed to connect to the
74 destination database. If this argument is not given dbicx-backend-move
75 will assume no password is needed.
76  
77 =item --verbose
78  
79 Optional option. Print the name of the table the tool is currently
80 working on and a dot for every row.
81  
82 =item --rawmode
83  
84 Optional mode. Normally during a DB transfer we read and write values
85 through the DBIC layers which can contain filters for deflate/inflate.
86 This guarantees that possible backend-specific filters are applied and
87 converted correctly. However, in some situation this can be too heavy
88 (memory/time consuming) or you want the exact same values transferred
89 without touching for other reasons. The rawmode does that.
90  
91 =back
92  
93 =head1 AUTHOR
94  
95 Maik Hentsche, C<< <Caldrin at cpan dot org> >>
96  
97 =head1 BUGS
98  
99 Please report any bugs or feature requests to C<bug-dbicx-migration at rt.cpan.org>, or through
100 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBICx-Backend-Move>. I will be notified, and then you'll
101 automatically be notified of progress on your bug as I make changes.
102  
103  
104 =head1 SUPPORT
105  
106 You can find documentation for this module with the perldoc command.
107  
108 perldoc DBICx::Backend::Move
109  
110  
111 You can also look for information at:
112  
113 =over 4
114  
115 =item * RT: CPAN's request tracker (report bugs here)
116  
117 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBICx-Backend-Move>
118  
119 =item * AnnoCPAN: Annotated CPAN documentation
120  
121 L<http://annocpan.org/dist/DBICx-Backend-Move>
122  
123 =item * CPAN Ratings
124  
125 L<http://cpanratings.perl.org/d/DBICx-Backend-Move>
126  
127 =item * Search CPAN
128  
129 L<http://search.cpan.org/dist/DBICx-Backend-Move/>
130  
131 =back
132  
133  
134 =head1 ACKNOWLEDGEMENTS
135  
136 Thanks to
137  
138 =over 4
139  
140 =item * renormalist for discussinh design decisions
141  
142 =item * mst for explaining transaction handling in DBIC and DBI
143  
144 =back
145  
146 =head1 LICENSE AND COPYRIGHT
147  
148 Copyright 2012 Maik Hentsche.
149  
150 This program is free software; you can redistribute it and/or modify it
151 under the terms of either: the GNU General Public License as published
152 by the Free Software Foundation; or the Artistic License.
153  
154 See http://dev.perl.org/licenses/ for more information.
155  
156  
157 =cut
« blib/lib/App/DBICx/Backend/Move.pm ↑ Summary blib/lib/DBICx/Backend/Move/SQLite.pm »