5 AddDistributedSeedCrossCvterm.pm
9 mx-run AddDistributedSeedCrossCvterm [options] -H hostname -D dbname -u username [-F]
11 this is a subclass of L<CXGN::Metadata::Dbpatch>
12 see the perldoc of parent class for more details.
16 This patch adds number of seeds distributed cvterms that can be stored in the nd_experimentprop table.
20 Alex Ogbonna<baco46@cornell.edu>
22 =head1 COPYRIGHT & LICENSE
24 Copyright 2010 Boyce Thompson Institute for Plant Research
26 This program is free software; you can redistribute it and/or modify
27 it under the same terms as Perl itself.
32 package AddDistributedSeedCrossCvterm
;
35 use Bio
::Chado
::Schema
;
37 extends
'CXGN::Metadata::Dbpatch';
40 has
'+description' => ( default => <<'' );
41 This patch adds number of seeds distributed cvterms that can be stored
in the nd_experimentprop table
.
47 print STDOUT
"Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " .";
49 print STDOUT
"\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n";
51 print STDOUT
"\nExecuting the SQL commands.\n";
53 my $schema = Bio
::Chado
::Schema
->connect( sub { $self->dbh->clone } );
57 my $no_seeds_distrubuted = $schema->resultset("Cv::Cvterm")->create_with({
58 name
=> 'number_of_seeds_distributed',
59 cv
=> 'nd_experiment_property',
65 $schema->txn_do($coderef);
67 die "Load failed! " . $_ . "\n" ;
70 print "You're done!\n";