.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBICDUMP 1p" .TH DBICDUMP 1p 2024-01-20 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME dbicdump \- Dump a schema using DBIx::Class::Schema::Loader .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& dbicdump \& dbicdump [\-I ] [\-o = ] \e \& .Ve .PP Examples: .PP .Vb 1 \& $ dbicdump schema.conf \& \& $ dbicdump \-o dump_directory=./lib \e \& \-o components=\*(Aq["InflateColumn::DateTime"]\*(Aq \e \& MyApp::Schema dbi:SQLite:./foo.db \& \& $ dbicdump \-o dump_directory=./lib \e \& \-o components=\*(Aq["InflateColumn::DateTime"]\*(Aq \e \& MyApp::Schema dbi:SQLite:./foo.db \*(Aq{ quote_char => "\e"" }\*(Aq \& \& $ dbicdump \-Ilib \-o dump_directory=./lib \e \& \-o components=\*(Aq["InflateColumn::DateTime"]\*(Aq \e \& \-o preserve_case=1 \e \& MyApp::Schema dbi:mysql:database=foo user pass \e \& \*(Aq{ quote_char => "\`" }\*(Aq \& \& $ dbicdump \-o dump_directory=./lib \e \& \-o components=\*(Aq["InflateColumn::DateTime"]\*(Aq \e \& MyApp::Schema \*(Aqdbi:mysql:database=foo;host=domain.tld;port=3306\*(Aq \e \& user pass .Ve .PP On Windows that would be: .PP .Vb 5 \& $ dbicdump \-o dump_directory=.\elib ^ \& \-o components="[q{InflateColumn::DateTime}]" ^ \& \-o preserve_case=1 ^ \& MyApp::Schema dbi:mysql:database=foo user pass ^ \& "{ quote_char => q{\`} }" .Ve .PP Configuration files must have schema_class and connect_info sections, an example of a general config file is as follows: .PP .Vb 1 \& schema_class MyApp::Schema \& \& lib /extra/perl/libs \& \& # connection string \& \& dsn dbi:mysql:example \& user root \& pass secret \& \& \& # dbic loader options \& \& dump_directory ./lib \& components InflateColumn::DateTime \& components TimeStamp \& .Ve .PP Using a config file requires Config::Any installed. .PP The optional \f(CW\*(C`lib\*(C'\fR key is equivalent to the \f(CW\*(C`\-I\*(C'\fR option. .SH DESCRIPTION .IX Header "DESCRIPTION" Dbicdump generates a DBIx::Class schema using "make_schema_at" in DBIx::Class::Schema::Loader and dumps it to disk. .PP You can pass any DBIx::Class::Schema::Loader::Base constructor option using \&\f(CW\*(C`\-o