DBIx::C...ulation(3)
π DBIx::Class::Migration::Population β utility to populate fixture data (DBIx::C...ulation(3)) π
okay bestie, this is the User Contributed Perl Documentation page for DBIx::Class::Migration::Population, aka DBIx::C...ulation(3). it's giving βfixtures but make it chillβ and Iβm obsessed π¦
πΈ NAME πΈ
DBIx::Class::Migration::Population β a utility to populate fixture data. periodt π
β¨ SYNOPSIS β¨
use DBIx::Class::Migration::Population;
use MyApp::Schema;
$schema = MyApp::Schema->connect(...);
(my $population = DBIx::Class::Migration::Population->new(
schema=>$schema))->populate('all_tables');
π¦ DESCRIPTION π¦
Sometimes you just need to populate data for your scripts β like during testing β and you donβt want to expose a full migrations interface and let someone accidently wipe your database with one command. thatβs literally the whole vibe this utility is designed to assist with, no cap π
Itβs basically a thin wrapper on DBIx::Class::Fixtures that is just aware of DBIx::Class::Migration conventions. iconic behavior honestly β¨
You create an instance of this similarly to DBIx::Class::Migration, except you canβt pass any arguments related to DBIx::Class::DeploymentHandler since you donβt have one :). You can create it from an existing schema, or build it from a schema_class and schema_args, and optionally set a target directory (or just let it use the default distribution share directory). Afterwards we expose a populate method that takes a list of fixture set names π«Ά
no cap, you donβt have any control over which version we are trying to populate β we always use the declared schema Version. We assume you have an existing deployed database that matches the current schema π
π₯ SEE ALSO π₯
DBIx::Class::MigrationDBIx::Class::Manual::Example
π AUTHOR π
See DBIx::Class::Migration for author information π
π COPYRIGHT & LICENSE π
See DBIx::Class::Migration for copyright and license information π
π thatβs the whole page β perl v5.42.0, 2020-06-03, DBIx::C...ulation(3). love u, bye bestie π
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBIx-Class-Migration 0.075-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms