.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 3pm" .TH DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 3pm "2018-04-19" "perl v5.26.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" DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 \- Important Information Related to Upgrading from Version 0.04006 .SH "What Changed" .IX Header "What Changed" .IP "\(bu" 4 add_column .Sp The new Loader detects much more information about columns and sets flags like \&\f(CW\*(C`is_auto_increment\*(C'\fR that it didn't set before. .IP "\(bu" 4 RelBuilder .Sp The new RelBuilder will give you nicer accessor names for relationships, so you will no longer have conflicts between a foreign key column and the relationship accessor itself (if the \s-1FK\s0 is named \f(CW\*(C`_id\*(C'\fR.) .Sp It will also more correctly infer the relationship type, e.g. some relationships that were previously detected as a \f(CW\*(C`has_many\*(C'\fR will now be a \f(CW\*(C`might_have\*(C'\fR (when it detects a unique constraint on the foreign key column.) .Sp Also \f(CW\*(C`cascade_delete\*(C'\fR and \f(CW\*(C`cascade_copy\*(C'\fR are turned off for by default for \&\f(CW\*(C`has_many\*(C'\fR and \f(CW\*(C`might_have\*(C'\fR relationships, while \f(CW\*(C`belongs_to\*(C'\fR relationships are created with \f(CW\*(C`on_delete => \*(AqCASCADE\*(Aq\*(C'\fR and \f(CW\*(C`on_update => \*(AqCASCADE\*(Aq\*(C'\fR by default. This is overridable via relationship_attrs. .IP "\(bu" 4 moniker_map .Sp Table names are now singularized when determining the \f(CW\*(C`Result\*(C'\fR class names. So the table \f(CW\*(C`user_roles\*(C'\fR would have become \f(CW\*(C`UserRoles\*(C'\fR in \f(CW0.04006\fR but now becomes \f(CW\*(C`UserRole\*(C'\fR instead. .IP "\(bu" 4 use_namespaces .Sp Now defaults to on. See \*(L"use_namespaces\*(R" in DBIx::Class::Schema::Loader::Base and \&\*(L"load_namespaces\*(R" in DBIx::Class::Schema. .IP "\(bu" 4 Support for more databases .Sp We now support Microsoft \s-1SQL\s0 Server and Sybase, and there are also many improvements to the other backends. .SH "Backward Compatibility" .IX Header "Backward Compatibility" In backward compatibility mode, the Loader will use the old relationship names and types, will not singularize monikers for tables, and \f(CW\*(C`use_namespaces\*(C'\fR will be off. .PP To control this behavior see \*(L"naming\*(R" in DBIx::Class::Schema::Loader::Base and \&\*(L"use_namespaces\*(R" in DBIx::Class::Schema::Loader::Base. .SS "Static Schemas" .IX Subsection "Static Schemas" When reading a \f(CW\*(C`Schema.pm\*(C'\fR from a static schema generated with an \f(CW0.04\fR version of Loader, backward compatibility mode will default to on, unless overridden with the \f(CW\*(C`naming\*(C'\fR and/or \f(CW\*(C`use_namespaces\*(C'\fR attributes. .SS "Dynamic Schemas" .IX Subsection "Dynamic Schemas" Dynamic schemas will always by default use \f(CW0.04006\fR mode and have \&\f(CW\*(C`use_namespaces\*(C'\fR off. .PP To upgrade a dynamic schema, set the \f(CW\*(C`naming\*(C'\fR and \f(CW\*(C`use_namespaces\*(C'\fR attributes (which is proxied to the loader) in your \f(CW\*(C`Schema.pm\*(C'\fR: .PP .Vb 2 \& _\|_PACKAGE_\|_\->naming(\*(Aqcurrent\*(Aq); \& _\|_PACKAGE_\|_\->use_namespaces(1); .Ve .SH "AUTHORS" .IX Header "AUTHORS" See \*(L"\s-1AUTHORS\*(R"\s0 in DBIx::Class::Schema::Loader. .SH "LICENSE" .IX Header "LICENSE" This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.