DBIx::Class::Migration::RunScript::Trait::Populate - Populate fixtures =head1 SYNOPSIS
use DBIx::Class::Migration::RunScript; builder { 'SchemaLoader', 'Populate', sub { shift->populate('countries'); }; };
This is a Moose::Role that adds a populate method to your run script. This allows you to access any of your previously dumped fixtures. You might find this useful when installing a database that was previously setup.
populate
This trait requires a schema previously defined, such as provided by DBIx::Class::Migration::RunScript::Trait::SchemaLoader.
schema
This class defines the follow methods.
Requires $arg || @args
Given a fixture set (or list of sets), use DBIx::Class::Fixtures to populate them to the current database.
When naming sets, you skip the '.json' extension.
Requires $arg
Given a set name, returns a boolean about if that set actually has fixtures previously dumped.
DBIx::Class::Migration, DBIx::Class::Migration::RunScript
See DBIx::Class::Migration for author information
See DBIx::Class::Migration for copyright and license information
To install DBIx::Class::Migration, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::Migration
CPAN shell
perl -MCPAN -e shell install DBIx::Class::Migration
For more information on module installation, please visit the detailed CPAN module installation guide.