10 mx-run AddNewListTypes [options] -H hostname -D dbname -u username [-F]
12 Adds the list type "Plants" required for validation of list containing plants.
14 this is a subclass of L<CXGN::Metadata::Dbpatch>
15 see the perldoc of parent class for more details.
19 This is a test dummy patch.
20 This subclass uses L<Moose>. The parent class uses L<MooseX::Runnable>
24 Lukas Mueller <lam87@cornell.edu>
26 =head1 COPYRIGHT & LICENSE
28 Copyright 2010 Boyce Thompson Institute for Plant Research
30 This program is free software; you can redistribute it and/or modify
31 it under the same terms as Perl itself.
36 package AddPlantListType
;
39 use Bio
::Chado
::Schema
;
41 extends
'CXGN::Metadata::Dbpatch';
44 has
'+description' => ( default => <<'' );
45 This patch will create the cvterm
'plant'.
51 print STDOUT
"Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " .";
53 print STDOUT
"\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n";
55 print STDOUT
"\nExecuting the SQL commands.\n";
57 my $schema = Bio
::Chado
::Schema
->connect( sub { $self->dbh->clone } );
61 my $numbers_list_type_cvterm = $schema->resultset("Cv::Cvterm")->create_with({
63 definition
=> 'plants',
70 $schema->txn_do($coderef);
73 die "Load failed! " . $_ . "\n" ;
76 print "You're done!\n";