awips2/deltaScripts/14.4.1/DR2714/removeOldSatTables.sh

23 lines
580 B
Bash
Raw Normal View History

2022-05-05 12:34:50 -05:00
#!/bin/bash
# Omaha #2714 static tables have been replaced by XML backed in-memory lookup tables
DBUSER="awips"
DBNAME="metadata"
PSQL="/awips2/psql/bin/psql"
for table in satellite_creating_entities satellite_geostationary_positions satellite_physical_elements satellite_sector_ids satellite_sources satellite_units
do
echo Dropping table: $table
command="DROP TABLE IF EXISTS $table"
if ${PSQL} -U ${DBUSER} -d ${DBNAME} -c "$command"
then
echo $table dropped successfully
else
echo problem dropping table: $table
fi
done
echo Done