awips2/deltaScripts/12.5.1/drop_gfe_tables.sh
Steve Harris 2f10c7a1e4 12.5.1-15 baseline
Former-commit-id: 3904c4ccf5 [formerly b13cbb7e00 [formerly 4909e0dd166e43c22a34d96aa744f51db8a7d6c0]]
Former-commit-id: b13cbb7e00
Former-commit-id: 8552902906
2012-06-08 13:39:48 -05:00

28 lines
666 B
Bash

#!/bin/bash
# This script will drop some GFE tables so they will be recreated
#
# This needs to be performed with build 12.5.1
#
PSQL="/awips2/psql/bin/psql"
SQL_COMMAND="DROP TABLE IF EXISTS smartinit, gfe_iscsend CASCADE; DELETE FROM plugin_info WHERE name='com.raytheon.edex.plugin.gfe';"
if [ ! -f ${PSQL} ]; then
echo "ERROR: The PSQL executable does not exist - ${PSQL}."
echo "FATAL: Update Failed!"
exit 1
fi
echo ""
echo "Press Enter to perform the updates Ctrl-C to quit."
read done
${PSQL} -U awips -d metadata -c "${SQL_COMMAND}"
if [ $? -ne 0 ]; then
echo "FATAL: Update Failed!"
exit 1
fi
echo "INFO: The update was successfully applied."
exit 0