| DBIx-Class-Schema-Loader documentation | Contained in the DBIx-Class-Schema-Loader distribution. |
DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 - Important Information Related to Upgrading from Version 0.04006
is_auto_increment that it didn't set before. _id.)
has_many will now be a might_have
(when it detects a unique constraint on the foreign key column.)
cascade_delete and cascade_copy are turned off for by default for
has_many and might_have relationships, while belongs_to relationships
are created with on_delete => 'CASCADE' and on_update => 'CASCADE'
by default. This is overridable via
relationship_attrs. Result class names. So
the table user_roles would have become UserRoles in 0.04006 but now
becomes UserRole instead. In backward compatibility mode, the Loader will use the old relationship names
and types, will not singularize monikers for tables, and use_namespaces will
be off.
To control this behavior see naming in DBIx::Class::Schema::Loader::Base and use_namespaces in DBIx::Class::Schema::Loader::Base.
When reading a Schema.pm from a static schema generated with an 0.04
version of Loader, backward compatibility mode will default to on, unless
overridden with the naming and/or use_namespaces attributes.
Dynamic schemas will always by default use 0.04006 mode and have
use_namespaces off.
To upgrade a dynamic schema, set the naming and use_namespaces attributes
(which is proxied to the loader) in your Schema.pm:
__PACKAGE__->naming('current');
__PACKAGE__->use_namespaces(1);
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| DBIx-Class-Schema-Loader documentation | Contained in the DBIx-Class-Schema-Loader distribution. |