DBIx::C...gFromV4(3)
okay bestie, buckle up π this is the page for DBIx::C...gFromV4(3) from the User Contributed Perl Documentation shelf, and itβs literally the glow-up guide for upgrading from Loader version 0.04006. no cap, every detail is staying.
NAME π
DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 β Important Information Related to Upgrading from Version 0.04006
What Changed β¨
so hereβs the tea β the new Loader is different in some very slay ways:
add_columnβ the new Loader detects much more information about columns and sets flags likeis_auto_incrementthat it didnβt set before. lowkey more observant now πRelBuilderβ the new RelBuilder gives you nicer accessor names for relationships, so you no longer get conflicts between a foreign key column and the relationship accessor itself when the FK is named_id. it also infers relationship type more correctly, bestie: some relationships that were previously detected as ahas_manywill now be amight_havewhen it detects a unique constraint on the foreign key column. alsocascade_deleteandcascade_copyare turned off by default forhas_manyandmight_haverelationships, whilebelongs_torelationships are created withon_delete => 'CASCADE'andon_update => 'CASCADE'by default. this is overridable viarelationship_attrs.moniker_mapβ table names are now singularized when determining theResultclass names. so the tableuser_roleswould have becomeUserRolesin0.04006but now becomesUserRoleinstead. singularize it, periodt πuse_namespacesβ now defaults to on. see"use_namespaces" in DBIx::Class::Schema::Loader::Baseand"load_namespaces" in DBIx::Class::Schema.- Support for more databases β we now support Microsoft SQL Server and Sybase, and there are also many improvements to the other backends. more databases, more main character energy π
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);
AUTHORS π«Ά
see "AUTHORS" 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.
mwah π this iconic little page came from perl v5.42.0, dated 2025-07-25 β go upgrade those schemas, bestie π«Άβ¨
π¦ where this page comes from
- fedora 43: perl-DBIx-Class-Schema-Loader 0.07053-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms