1DBICDUMP(1)           User Contributed Perl Documentation          DBICDUMP(1)
2
3
4

NAME

6       dbicdump - Dump a schema using DBIx::Class::Schema::Loader
7

SYNOPSIS

9           dbicdump <configuration_file>
10           dbicdump [-I <lib-path>] [-o <loader_option>=<value> ] \
11                    <schema_class> <connect_info>
12
13       Examples:
14
15           $ dbicdump schema.conf
16
17           $ dbicdump -o dump_directory=./lib \
18             -o components='["InflateColumn::DateTime"]' \
19             MyApp::Schema dbi:SQLite:./foo.db
20
21           $ dbicdump -o dump_directory=./lib \
22             -o components='["InflateColumn::DateTime"]' \
23             MyApp::Schema dbi:SQLite:./foo.db '{ quote_char => "\"" }'
24
25           $ dbicdump -Ilib -o dump_directory=./lib \
26             -o components='["InflateColumn::DateTime"]' \
27             -o preserve_case=1 \
28             MyApp::Schema dbi:mysql:database=foo user pass \
29             '{ quote_char => "`" }'
30
31           $ dbicdump -o dump_directory=./lib \
32             -o components='["InflateColumn::DateTime"]' \
33             MyApp::Schema 'dbi:mysql:database=foo;host=domain.tld;port=3306' \
34             user pass
35
36       On Windows that would be:
37
38           $ dbicdump -o dump_directory=.\lib ^
39             -o components="[q{InflateColumn::DateTime}]" ^
40             -o preserve_case=1 ^
41             MyApp::Schema dbi:mysql:database=foo user pass ^
42             "{ quote_char => q{`} }"
43
44       Configuration files must have schema_class and connect_info sections,
45       an example of a general config file is as follows:
46
47           schema_class MyApp::Schema
48
49           lib /extra/perl/libs
50
51           # connection string
52           <connect_info>
53               dsn     dbi:mysql:example
54               user    root
55               pass    secret
56           </connect_info>
57
58           # dbic loader options
59           <loader_options>
60               dump_directory ./lib
61               components     InflateColumn::DateTime
62               components     TimeStamp
63           </loader_options>
64
65       Using a config file requires Config::Any installed.
66
67       The optional "lib" key is equivalent to the "-I" option.
68

DESCRIPTION

70       Dbicdump generates a DBIx::Class schema using "make_schema_at" in
71       DBIx::Class::Schema::Loader and dumps it to disk.
72
73       You can pass any DBIx::Class::Schema::Loader::Base constructor option
74       using "-o <option>=<value>". For convenience, option names will have
75       "-" replaced with "_" and values that look like references or quote-
76       like operators will be "eval"-ed before being passed to the
77       constructor.
78
79       The "dump_directory" option defaults to the current directory if not
80       specified.
81

SEE ALSO

83       DBIx::Class::Schema::Loader, DBIx::Class.
84

AUTHORS

86       See "AUTHORS" in DBIx::Class::Schema::Loader.
87

LICENSE

89       This program is free software; you can redistribute it and/or modify it
90       under the same terms as Perl itself.
91
92
93
94perl v5.38.0                      2023-07-20                       DBICDUMP(1)
Impressum