awips2/deltaScripts/16.2.1-pda/DR5810/updateReplicationDb.sh

19 lines
750 B
Bash
Raw Normal View History

2017-04-21 18:33:55 -06:00
#!/bin/sh
# DR 5810 - Drop replication related DB tables to clean up the obsolete ones and
# force the ones that changed to be recreated with the latest versions
# Note: Incorporates changes for #5386 and #5638
PSQL=/awips2/psql/bin/psql
USER=awips
# Run on the dx1
echo "Clean up replication tables and drop the ones that have changed to force them to be recreated.";
$PSQL -d metadata -U $USER << EOF
DROP TABLE IF EXISTS replication;
DROP TABLE IF EXISTS registryreplicationevents CASCADE;
DROP TABLE IF EXISTS registryreplicationsiteevents CASCADE;
DROP TABLE IF EXISTS registry_replication_sites CASCADE;
DROP TABLE IF EXISTS registry_replication_site_events CASCADE;
DROP TABLE IF EXISTS registry_replication_events CASCADE;
EOF