Commit | Line | Data |
9cc8e7e1 |
1 | =pod |
2 | |
3 | =head1 NAME |
4 | |
5 | DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 - Important Information |
6 | Related to Upgrading from Version 0.04006 |
7 | |
8 | =head1 What Changed |
9 | |
10 | =over 4 |
11 | |
12 | =item * |
13 | |
14 | add_column |
15 | |
16 | The new Loader detects much more information about columns and sets flags like |
17 | C<is_auto_increment> that it didn't set before. |
18 | |
19 | =item * |
20 | |
21 | RelBuilder |
22 | |
a0e0a56a |
23 | The new RelBuilder will give you nicer accessor names for relationships, so you |
24 | will no longer have conflicts between a foreign key column and the relationship |
25 | accessor itself (if the FK is named C<_id>.) |
9cc8e7e1 |
26 | |
27 | It will also more correctly infer the relationship type, e.g. some relationships |
28 | that were previously detected as a C<has_many> will now be a C<might_have> |
61b33506 |
29 | (when it detects a unique constraint on the foreign key column.) |
9cc8e7e1 |
30 | |
31 | =item * |
32 | |
33 | moniker_map |
34 | |
35 | Table names are now singularized when determining the C<Result> class names. So |
36 | the table C<user_roles> would have become C<UserRoles> in C<0.04006> but now |
37 | becomes C<UserRole> instead. |
38 | |
39 | =item * |
40 | |
41 | Support for more databases |
42 | |
43 | We now support Microsoft SQL Server and Sybase, and there are also improvements |
44 | to the other backends. |
45 | |
46 | =back |
47 | |
48 | =head1 Backward Compatibility |
49 | |
50 | In backward compatibility mode, the Loader will use the old relationship names |
51 | and types, and will not singularize monikers for tables. |
52 | |
53 | To control this behavior see L<DBIx::Class::Schema::Loader::Base/naming>. |
54 | |
55 | =head2 Static Schemas |
56 | |
57 | When reading a C<Schema.pm> from a static schema generated with an C<0.04> |
61b33506 |
58 | version of Loader, backward compatibility mode will default to on, unless |
59 | overridden with the C<naming> attribute. |
9cc8e7e1 |
60 | |
61 | =head2 Dynamic Schemas |
62 | |
63 | Dynamic schemas will always by default use C<0.04006> mode. |
64 | |
61b33506 |
65 | To upgrade a dynamic schema, set the naming attribute (which is proxied to the |
9cc8e7e1 |
66 | loader) in your C<Schema.pm>: |
67 | |
68 | __PACKAGE__->naming('current'); |
69 | |
70 | =head1 AUTHOR |
71 | |
72 | See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>. |
73 | |
74 | =head1 LICENSE |
75 | |
76 | This library is free software; you can redistribute it and/or modify it under |
77 | the same terms as Perl itself. |
78 | |
79 | =cut |