[Bio] / BioSimScratch / RebuildDb Repository:
ViewVC logotype

View of /BioSimScratch/RebuildDb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (annotate)
Tue Oct 19 19:33:32 2004 UTC (15 years, 1 month ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, sc2004-3, post-st-migration, sc2004-4, sc04-finalDay, sc2004-2, sc2004-1, sc2004-0, HEAD
Changes since 1.1: +25 -12 lines
make work for pg too

#!/bin/sh

if [ $# -ne 2 ]; then
   echo 'usage: RebuildDb [oracle|postgres] connectString'
   exit 1
fi

dbtype=$1
connectString=$2
echo doing $1 type db via $2

if [ $dbtype = "oracle" ]; then
   python ./BioSimscratch/destroyBss.py
fi

cd BioSimScratch

if [ $dbtype = "oracle" ]; then
   sqlplus $connectString << EOD
   @BssSchema
EOD
else
   psql $connectString -f BssSchema-pg.sql
   psql $connectString -f FnlChartTab-pg.sql
   psql $connectString -f ExcelBasedECTables-pg.sql
   psql $connectString -f CreateCatalog-pg.sql
fi


python ./InitializeDb.py 


#./ReloadBssData
#cd ..
#python BioSimScratch/buildNewBssCatalog.py


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3