awips2/deltaScripts/14.4.1/DR2587/nonNullTimes.sh
Steve Harris c39ac82323 Omaha #3300 moving 15.1.1 deltascript back into 14.4.1
Former-commit-id: b9a02bf34a [formerly b9a02bf34a [formerly 33cde5250c39fda59bbb08d7b8075cb5645c028f]]
Former-commit-id: 74fff3659f
Former-commit-id: 672709571d
2014-07-16 14:53:18 -05:00

11 lines
345 B
Bash
Executable file

#!/bin/bash
tables=$(psql -U awips -d metadata -tc "select table_name from information_schema.columns where column_name = 'reftime'")
echo "Updating record tables to disallow null times"
for table in $tables
do
echo "Updating $table"
psql -U awips -d metadata -c "ALTER TABLE $table ALTER COLUMN reftime SET NOT NULL"
done
echo "Done"