awips2/deltaScripts/12.5.1/addgfelockindex.sh
Steve Harris 46068c6716 12.5.1-15 baseline
Former-commit-id: 2f10c7a1e4 [formerly 8552902906] [formerly b13cbb7e00] [formerly 2f10c7a1e4 [formerly 8552902906] [formerly b13cbb7e00] [formerly 3904c4ccf5 [formerly b13cbb7e00 [formerly 4909e0dd166e43c22a34d96aa744f51db8a7d6c0]]]]
Former-commit-id: 3904c4ccf5
Former-commit-id: 1f521a70b3 [formerly 97c4db937e] [formerly 0e40eb424698bf43c230ac21347627590405fcb2 [formerly 676ea3192f]]
Former-commit-id: 5dd364497cd5da1357297a4b842e962ad3d5e006 [formerly 9054c5ab6c]
Former-commit-id: 39ff9954f8
2012-06-08 13:39:48 -05:00

28 lines
No EOL
605 B
Bash

#!/bin/bash
# This script will add an index to the gfelocktable table
#
# This needs to be performed with build 12.5.1.
#
PSQL="/awips2/psql/bin/psql"
SQL_COMMAND="CREATE INDEX lock_parmid_idx ON gfelocktable USING btree (parmid);"
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