DBIx::Class::Migration::Population - Utility to populate fixture data
use DBIx::Class::Migration::Population; use MyApp::Schema; $schema = MyApp::Schema->connect(...); (my $population = DBIx::Class::Migration::Population->new( schema=>$schema))->populate('all_tables');
Sometimes you just need to populate data for your scripts, such as during testing and you don't want to expose a full migrations interface and let someone accidently wipe your database with one command. This utility is designed to assist. It is basically a thin wrapper on DBIx::Class::Fixtures that is just aware of DBIx::Class::Migrations conventions.
You create an instance of this similarly to DBIx::Class::Migrations, 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 optional 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.
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 DBIx::Class::Migration for author information
See DBIx::Class::Migration for copyright and license information