awips2/deltaScripts/15.1.1/DR4001/dropHazardServicesTables.sh
David Gillingham c5961ac23e Omaha #4001: Ensure WarnGen sends properly populated SendPracticeProductRequest objects when transmitting in practice mode, create delta script for hazard services db changes.
Change-Id: I1debd8c239362a25cde641207ec57d7fc4c9cfd7

Former-commit-id: f1984e0a25c68fc21c1a9af833d1de2634bb489d
2015-01-15 14:42:35 -06:00

12 lines
694 B
Bash

#!/bin/bash
# DR #4001 - force hazard services tables to be recreated
PSQL="/awips2/psql/bin/psql"
echo "INFO: Dropping hazard services tables"
${PSQL} -U awips -d metadata -q -c "DROP TABLE IF EXISTS productdata, producttext, practice_hazards, practice_hazards_attributes, hazards_interoperability, hazards_interoperability_gfe CASCADE;"
${PSQL} -U awips -d metadata -q -c "DROP TABLE IF EXISTS practice_hazards_interoperability, practice_hazards_interoperability_gfe CASCADE;"
${PSQL} -U awips -d metadata -q -c "UPDATE plugin_info SET initialized=false WHERE name='hazards' OR name ='com.raytheon.uf.common.hazards.productgen';"
echo "INFO: Hazard services tables successfully dropped."