Change-Id: If38138650660c75745091a82c231cd0fe8c92e38 Former-commit-id:0c0e339894
[formerly10f74a1812
] [formerlyd25df40634
] [formerly0c0e339894
[formerly10f74a1812
] [formerlyd25df40634
] [formerly51cd71c373
[formerlyd25df40634
[formerly 49a3700d37c07f42991f7ca4a65f0fd4c7010f91]]]] Former-commit-id:51cd71c373
Former-commit-id:50f81cf656
[formerlydcae8c6aa2
] [formerly 91c71836947d0b2aea377fc28fa97fda33b6fd59 [formerly24a6795677
]] Former-commit-id: ec49165c9e367122a2e3115a12c8a3e00aa1dbca [formerly92828fbaa0
] Former-commit-id:9ed413f0c2
28 lines
No EOL
899 B
Bash
28 lines
No EOL
899 B
Bash
#!/bin/bash
|
|
# DR #2473 drops all deprecated grib data from the database
|
|
|
|
PSQL="/awips2/psql/bin/psql"
|
|
|
|
SQL_COMMAND="
|
|
delete from plugin_info where name = 'grib';
|
|
delete from plugin_info where name = 'ncgrib';
|
|
drop table if exists grib, grib_models;
|
|
drop table if exists ncgrib, ncgrib1_parameter_map, ncgrib_genprocess, ncgrib_models, ncgrib_parameters, ncgrib_surfaces, ncgridcoverage;
|
|
drop sequence if exists gribseq;
|
|
drop sequence if exists ncgribseq;
|
|
|
|
"
|
|
|
|
echo "INFO: Dropping grib tables."
|
|
|
|
${PSQL} -U awips -d metadata -c "${SQL_COMMAND}"
|
|
|
|
echo "INFO: Removing grib site localization files"
|
|
|
|
find /awips2/edex/data/utility/edex_static/site/ -iname 'gribPathkeys.xml' -exec rm -v {} \;
|
|
find /awips2/edex/data/utility/edex_static/site -iname 'gribPurgeRules.xml' -exec rm -v {} \;
|
|
|
|
rm -rv /awips2/edex/data/utility/common_static/site/*/grib/
|
|
|
|
echo "INFO: The update finished successfully."
|
|
exit 0 |