Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::class::schema::loader::manual::upgradingfromv4(3pm) [debian man page]

DBIx::Class::Schema::Loader::Manual::UpgradingFromV4(3pmUser Contributed Perl DocumentatiDBIx::Class::Schema::Loader::Manual::UpgradingFromV4(3pm)

NAME
DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 - Important Information Related to Upgrading from Version 0.04006 What Changed o add_column The new Loader detects much more information about columns and sets flags like "is_auto_increment" that it didn't set before. o RelBuilder 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 FK is named "_id".) It will also more correctly infer the relationship type, e.g. some relationships that were previously detected as a "has_many" will now be a "might_have" (when it detects a unique constraint on the foreign key column.) Also "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. o moniker_map Table names are now singularized when determining the "Result" class names. So the table "user_roles" would have become "UserRoles" in 0.04006 but now becomes "UserRole" instead. o use_namespaces Now defaults to on. See "use_namespaces" in DBIx::Class::Schema::Loader::Base and "load_namespaces" in DBIx::Class::Schema. o Support for more databases We now support Microsoft SQL Server and Sybase, and there are also many improvements to the other backends. Backward Compatibility 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. Static Schemas 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 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); AUTHOR
See "AUTHOR" in DBIx::Class::Schema::Loader and "CONTRIBUTORS" in DBIx::Class::Schema::Loader. LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-06-10 DBIx::Class::Schema::Loader::Manual::UpgradingFromV4(3pm)

Check Out this Related Man Page

DBIx::Class::Schema::Loader::RelBuilder(3pm)		User Contributed Perl Documentation	      DBIx::Class::Schema::Loader::RelBuilder(3pm)

NAME
DBIx::Class::Schema::Loader::RelBuilder - Builds relationships for DBIx::Class::Schema::Loader SYNOPSIS
See DBIx::Class::Schema::Loader and DBIx::Class::Schema::Loader::Base. DESCRIPTION
This class builds relationships for DBIx::Class::Schema::Loader. This is module is not (yet) for external use. METHODS
new Arguments: $loader object generate_code Arguments: [ [ local_moniker1 (scalar), fk_info1 (arrayref), uniq_info1 (arrayref) ] [ local_moniker2 (scalar), fk_info2 (arrayref), uniq_info2 (arrayref) ] ... ] This generates the code for the relationships of each table. "local_moniker" is the moniker name of the table which had the REFERENCES statements. The fk_info arrayref's contents should take the form: [ { local_table => 'some_table', local_moniker => 'SomeTable', local_columns => [ 'col2', 'col3' ], remote_table => 'another_table_moniker', remote_moniker => 'AnotherTableMoniker', remote_columns => [ 'col5', 'col7' ], }, { local_table => 'some_other_table', local_moniker => 'SomeOtherTable', local_columns => [ 'col1', 'col4' ], remote_table => 'yet_another_table_moniker', remote_moniker => 'YetAnotherTableMoniker', remote_columns => [ 'col1', 'col2' ], }, # ... ], The uniq_info arrayref's contents should take the form: [ [ uniq_constraint_name => [ 'col1', 'col2' ], ], [ another_uniq_constraint_name => [ 'col1', 'col2' ], ], ], This method will return the generated relationships as a hashref keyed on the class names. The values are arrayrefs of hashes containing method name and arguments, like so: { 'Some::Source::Class' => [ { method => 'belongs_to', arguments => [ 'col1', 'Another::Source::Class' ], { method => 'has_many', arguments => [ 'anothers', 'Yet::Another::Source::Class', 'col15' ], ], 'Another::Source::Class' => [ # ... ], # ... } AUTHOR
See "AUTHOR" in DBIx::Class::Schema::Loader and "CONTRIBUTORS" in DBIx::Class::Schema::Loader. LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-08 DBIx::Class::Schema::Loader::RelBuilder(3pm)
Man Page