awips2/deltaScripts/archived/future/removeHdfFileId.sh
Richard Peter 55708f1d55 Issue #2854: Reorganize deltaScripts
Former-commit-id: 09f41a6b31 [formerly 56745c942e] [formerly 09f41a6b31 [formerly 56745c942e] [formerly c8e373c098 [formerly 469c2c597b80fd725f474e0d645656e4054fd69a]]]
Former-commit-id: c8e373c098
Former-commit-id: a526600e3e [formerly e1721cad00]
Former-commit-id: 18b4d133c7
2014-04-30 13:03:44 -05: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