awips2/deltaScripts/12.5.1/drop_gfe_tables.sh
Steve Harris ed04125cd7 12.10.1-4 baseline
Former-commit-id: 0d8d18d7e2 [formerly e38e81ab8c] [formerly fd19ca5624] [formerly 0d8d18d7e2 [formerly e38e81ab8c] [formerly fd19ca5624] [formerly 49c3861597 [formerly fd19ca5624 [formerly 56e6f8927c92cd546e5fb7a01ad2f19add91f6ed]]]]
Former-commit-id: 49c3861597
Former-commit-id: 424c32bd5d [formerly 684feb34e5] [formerly 26cccfeea72d00040b6ff379b12158bba9f339d2 [formerly 2ba58a3576]]
Former-commit-id: 8c6c58e31355710e22a13ff534f4c47d0ed7d0b0 [formerly 26b7d083ec]
Former-commit-id: e57e7237a9
2012-09-13 12:08:11 -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