Omaha #4360 Delta scripts for AWIPS2-NCEP.
Change-Id: I935c96366b073182aa8dba817c788a7174e9578d Former-commit-id: 321d82c225b6ab57f451094c95db020be9dda8fe
This commit is contained in:
parent
0657c14bdd
commit
0984d8cf88
2 changed files with 25 additions and 2 deletions
|
@ -25,3 +25,26 @@ for table in ${tables[@]} ; do
|
|||
done
|
||||
echo "INFO: Finish update of embedded ${embClass} dataURI columns in table ${table}."
|
||||
done
|
||||
|
||||
tables=("airep" "pirep")
|
||||
|
||||
#tables have the same non-nullable @DataURI columns
|
||||
cols=("reporttype" "corindicator")
|
||||
|
||||
# table and constraint names from AirepRecord and PirepRecord.
|
||||
for table in ${tables[@]} ; do
|
||||
if tableExists $table ; then
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
|
||||
for col in ${cols[@]} ; do
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
${PSQL} -U awips -d metadata -c "UPDATE ${table} SET ${col}='null' where ${col} is NULL ; "
|
||||
updateNotNullCol ${table} ${col}
|
||||
done
|
||||
|
||||
echo "INFO: ${table} dataURI columns updated successfully"
|
||||
else
|
||||
echo "WARNING: ${table} does not exist."
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ source ${cmdDir}/commonFunctions.sh
|
|||
|
||||
# Does not include tables generated from classes in the AWIP2_NCEP branch
|
||||
|
||||
tables=("acars" "acarssounding" "binlightning" "bufrncwf" "bufrmos_location" "bufrmosavn" "bufrmoseta" "bufrmosgfs" "bufrmoshpc"
|
||||
tables=("acars" "acarssounding" "airep" "binlightning" "bufrncwf" "bufrmos_location" "bufrmosavn" "bufrmoseta" "bufrmosgfs" "bufrmoshpc"
|
||||
"bufrmoslamp" "bufrmosmrf" "bufrmosngm" "bufrmthdw" "bufrquikscat" "bufrascat" "bufrhdw" "bufrsigwx" "bufrssmi" "bufrua" "cwa" "cwat" "ffmp" "fog"
|
||||
"ccfp" "crimss" "fssobs" "goessounding" "grid" "ldad_manual" "ldadhydro" "ldadmesonet" "ldadprofiler" "lsr" "madis" "modelsounding"
|
||||
"nucaps" "obs" "poessounding"
|
||||
"ncpafm" "ncscd" "nctaf" "ncuair" "nucaps" "obs" "pirep" "poessounding"
|
||||
"practicewarning" "profiler" "qc" "sfcobs" "svrwx" "tcg" "tcs" "vaa" "warning")
|
||||
echo "INFO: rename tables unique constraints"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue