awips2/deltaScripts/14.4.1/DR3091/alter_taf_queue.sh
Roger Ferrel c226ef3596 Omaha #3091 Remove the use of aviationForecastConfig.xml file and only using OUP.
Change-Id: Ibcd4c5389ba081b19a3134989c507b88b2d882b8

Former-commit-id: 909a3f42bdb9d8149013056f9956bf0c38b764c5
2014-05-09 09:34:49 -05:00

18 lines
622 B
Bash
Executable file

#!/bin/bash
# DR #3091 This changes the awips.taf_queue forecasterid column from type integer
# to a varchar converting any values in the table.
PSQL="/awips2/psql/bin/psql"
echo "INFO: Altering awips.taf_queue's forecaster column."
${PSQL} -U awips -d metadata -c "alter table awips.taf_queue alter column forecasterid set data type varchar(255)
using to_char(forecasterid, '000');"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to alter tabelawips.taf_queue's column forecasterid."
echo "FATAL: The update has failed."
exit 1
fi
echo "INFO: awips.taf_queue's forecaster column altered successfully."