awips2/deltaScripts/future/removeHdfFileId.sh
Steve Harris 98059f9ef1 12.9.1-5 baseline
Former-commit-id: 77cbd6c1e5 [formerly a1d931fd44] [formerly 61f269f54c] [formerly 77cbd6c1e5 [formerly a1d931fd44] [formerly 61f269f54c] [formerly f2fac39428 [formerly 61f269f54c [formerly d85b989f77196d20eb2d2a21cf4daa13d50474ae]]]]
Former-commit-id: f2fac39428
Former-commit-id: d9faed979f [formerly 7fb0b17bd5] [formerly 54140b7733222bbc423315196e9781453b12f896 [formerly 72824561cb]]
Former-commit-id: 84e9e52a92ae5e740b0daf680a98316f7435f7f7 [formerly 9b5c2094ed]
Former-commit-id: 2d928d328e
2012-08-21 15:27:03 -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