DBIx::C...ulation(3)

πŸ“¦ version 0.075, in opensuse-leap 16.0

πŸŽ€ 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::Migration
  • DBIx::Class::Manual::Example

πŸ’œ AUTHOR πŸ’œ

See DBIx::Class::Migration for author information πŸŽ€


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