awips2/deltaScripts/future/removeHdfFileId.sh
David Gillingham e8d336e205 Issue #20: Merge all changes from previous SVN repo to GIT.
Former-commit-id: b31f40ec9d [formerly 845e6c19af] [formerly b31f40ec9d [formerly 845e6c19af] [formerly b056e18757 [formerly 926a2a6a5af5b3514c29097deb0fc24b093643a2]]]
Former-commit-id: b056e18757
Former-commit-id: ea7a55ad8d [formerly 87b15de88b]
Former-commit-id: d85d78f180
2012-01-26 17:38:43 -06:00

10 lines
408 B
Bash

#!/bin/sh
# This script should be run on dx1 as part of next delivery to remove the hdfFileId columns
tablesToUpdate=`psql -U awips -d metadata -t -c "select table_name from information_schema.columns where table_catalog='metadata' and table_schema='awips' and column_name = 'hdffileid';"`
for table in $tablesToUpdate
do
psql -U awips -d metadata -t -c "ALTER TABLE $table DROP COLUMN hdffileid"
done