From: Nigel Metheringham Date: Fri, 24 Sep 2010 14:45:36 +0000 (+0100) Subject: Add artistid to populate script X-Git-Tag: v0.001005~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e171480f0cad3034557f3b606c31962fe9b85b1;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git Add artistid to populate script As no column attributes were defined we have to specify all the column values. An alternative (more sensible) would be to make artistid auto increment but that means we cannot just copy the example classes. --- diff --git a/lib/DBIx/Class/DeploymentHandler/Manual/Intro.pod b/lib/DBIx/Class/DeploymentHandler/Manual/Intro.pod index 3e24518..d366ea8 100644 --- a/lib/DBIx/Class/DeploymentHandler/Manual/Intro.pod +++ b/lib/DBIx/Class/DeploymentHandler/Manual/Intro.pod @@ -92,15 +92,15 @@ To truly take advantage of all DBIx::Class::DeploymentHandler offers, you should probably be using it for population. To do that all you need to do is create a file called C: - sub { - my $schema = shift; - $schema->resultset('Artist')->populate([ - ['name'], - ['Marillion'], - ['The Moutain Goats'], - ['Ladyhawke'], - ]); - }; + sub { + my $schema = shift; + $schema->resultset('Artist')->populate([ + ['artistid', 'name'], + [1, 'Marillion'], + [2, 'The Moutain Goats'], + [3, 'Ladyhawke'], + ]); + }; =head1 Upgrading