Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DBIx::Class::MigrationUserBContributedMPerltDocumentacript::Trait::Populate(3)

NAME
       DBIx::Class::Migration::RunScript::Trait::Populate - Populate fixtures
       =head1 SYNOPSIS

	   use DBIx::Class::Migration::RunScript;

	   builder {
	     'SchemaLoader',
	     'Populate',
	     sub {
	       shift->populate('countries');
	     };
	   };

DESCRIPTION
       This is a Moo::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.

       This trait requires a "schema" previously defined, such as provided by
       DBIx::Class::Migration::RunScript::Trait::SchemaLoader.

methods
       This class defines the follow methods.

   populate
       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.

   set_has_fixtures
       Requires	$arg

       Given a set name, returns a boolean about if that set actually has
       fixtures	previously dumped.

SEE ALSO
       DBIx::Class::Migration, DBIx::Class::Migration::RunScript

AUTHOR
       See DBIx::Class::Migration for author information

COPYRIGHT & LICENSE
       See DBIx::Class::Migration for copyright	and license information

perl v5.32.1		 DBIx::Class::Migration::RunScript::Trait::Populate(3)

NAME | DESCRIPTION | methods | SEE ALSO | AUTHOR | COPYRIGHT & LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DBIx::Class::Migration::RunScript::Trait::Populate&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help