6 AddSeedlotMaintenanceType.pm
10 mx-run AddSeedlotMaintenanceType [options] -H hostname -D dbname -u username [-F]
14 This patch adds the cvterm 'seedlot_maintenance_json' to the 'stock_property' cv
18 David Waring <djw64@cornell.edu>
20 =head1 COPYRIGHT & LICENSE
22 Copyright 2010 Boyce Thompson Institute for Plant Research
24 This program is free software; you can redistribute it and/or modify
25 it under the same terms as Perl itself.
30 package AddSeedlotMaintenanceType
;
33 use Bio
::Chado
::Schema
;
35 extends
'CXGN::Metadata::Dbpatch';
37 has
'+description' => ( default => <<'' );
38 This patch adds the cvterm
'seedlot_maintenance_json' to the
'stock_property' cv
49 print STDOUT
"Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " .";
51 print STDOUT
"\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n";
53 print STDOUT
"\nExecuting the SQL commands.\n";
55 my $schema = Bio
::Chado
::Schema
->connect( sub { $self->dbh->clone } );
56 my $term = 'seedlot_maintenance_json';
57 $schema->resultset("Cv::Cvterm")->create_with({
59 cv
=> 'stock_property'
62 print "You're done!\n";