awips2/deltaScripts/13.4.1/createScanIndexes.sh
Steve Harris ff7a21ac37 13.4.1-7 baseline
Former-commit-id: 8072752c77 [formerly 4c6ff79e71] [formerly 8347bed50e [formerly dd6304e82206bb46b0c0442d15ab5d9312d9f19f]]
Former-commit-id: 8347bed50e
Former-commit-id: b35027f661
2013-05-13 12:58:10 -04:00

17 lines
470 B
Bash

#!/bin/bash
# DR #1926 - this update script will create a scan index
PSQL="/awips2/psql/bin/psql"
echo "INFO: Creating scan_icao_type_idx"
${PSQL} -U awips -d metadata -c "CREATE INDEX scan_icao_type_idx ON scan USING btree (icao COLLATE pg_catalog.\"default\", type COLLATE pg_catalog.\"default\");"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to create index."
echo "FATAL: The update has failed."
exit 1
fi
echo "INFO: Index created successfully!"
exit 0