Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / db / 00013 / AddWebUsrDeletePermToOrganismprop.pm
blobf88223f43d49e668d945c104340d271c642c84f7
1 #!/usr/bin/env perl
2 package AddWebUsrDeletePermToOrganismprop;
4 use Moose;
5 extends 'CXGN::Metadata::Dbpatch';
7 sub patch {
8 my $self=shift;
11 print STDOUT "Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " .";
13 print STDOUT "\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n";
17 print STDOUT "\nExecuting the SQL commands.\n";
19 $self->dbh->do(<<EOSQL);
20 --do your SQL here
23 grant insert on cvterm to web_usr;
24 grant usage, update on cvterm_cvterm_id_seq to web_usr;
25 grant insert,delete,update on public.organismprop to web_usr;
26 grant usage, update on organismprop_organismprop_id_seq to web_usr;
27 EOSQL
29 print "You're done!\n";
34 ####
35 1; #
36 ####