[Bio] / Sprout / LoadSproutTables.pl Repository:
ViewVC logotype

Diff of /Sprout/LoadSproutTables.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19, Mon Jan 30 21:52:29 2006 UTC revision 1.20, Tue Jan 31 07:33:46 2006 UTC
# Line 238  Line 238 
238  if ($options->{dbCreate}) {  if ($options->{dbCreate}) {
239      # Here we want to drop and re-create the database.      # Here we want to drop and re-create the database.
240      my $db = $FIG_Config::sproutDB;      my $db = $FIG_Config::sproutDB;
241      if ($FIG_Config::dbms eq "Pg") {      DBKernel::CreateDB($db);
         my $dbport = $FIG_Config::dbport;  
         my $dbuser = $FIG_Config::dbuser;  
         Trace("Dropping old database (failure is okay).") if T(2);  
         system("dropdb -p $dbport -U $dbuser $db");  
         Trace("Creating new database.") if T(2);  
         &FIG::run("createdb -p $dbport -U $dbuser $db");  
     } elsif ($FIG_Config::dbms eq "mysql") {  
         Trace("Dropping old database (failure is okay).") if T(2);  
         system("mysqladmin -u $FIG_Config::dbuser -p drop $db");  
         &FIG::run("mysqladmin -u $FIG_Config::dbuser -p create $db");  
         Trace("Creating new database.") if T(2);  
     }  
242  }  }
243  # Create the sprout loader object. Note that the Sprout object does not  # Create the sprout loader object. Note that the Sprout object does not
244  # open the database unless the "dbLoad" option is turned on.  # open the database unless the "dbLoad" option is turned on.

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3