awips2/deltaScripts/16.2.1/DR4360/alterAcarsDataURI.sh
2022-05-05 12:34:50 -05:00

19 lines
514 B
Bash
Executable file

#!/bin/bash
# DR #4360 - this update script will alter the dataURI column from acars
PSQL="/awips2/psql/bin/psql"
cmdDir=`dirname $0`
source ${cmdDir}/commonFunctions.sh
table=acars
# table and constraint names from ACARSRecord.
echo "INFO: Start update of ${table} dataURI columns."
col=tailNumber
echo "INFO: Update ${table}' ${col}"
${PSQL} -U awips -d metadata -c "DELETE from ${table} where ${col} is NULL ; "
updateNotNullCol ${table} ${col}
echo "INFO: ${table} dataURI columns updated successfully"