Omaha #4360 Cleanup all unique constraint naming now in a single script.
Former-commit-id: a0b96eaea4d8f0ad7368365ca3f89930379023f4
This commit is contained in:
parent
eeedba3a2f
commit
d4d75d7aab
13 changed files with 9 additions and 20 deletions
|
@ -8,9 +8,8 @@ cmdDir=`dirname $0`
|
|||
source ${cmdDir}/commonFunctions.sh
|
||||
table=acars
|
||||
|
||||
# table and constraint names form ACARSRecord.
|
||||
# table and constraint names from ACARSRecord.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=tailNumber
|
||||
echo "INFO: Update ${table}' ${col}"
|
||||
|
|
|
@ -8,9 +8,8 @@ cmdDir=`dirname $0`
|
|||
source ${cmdDir}/commonFunctions.sh
|
||||
table=bufrmthdw
|
||||
|
||||
# table and constraint names form BufrMTHDWObs.
|
||||
# table and constraint names from BufrMTHDWObs.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=pressure
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -14,7 +14,6 @@ cols=("stationId" "latitude" "longitude")
|
|||
|
||||
# table and constraint names from BufrMosDataLocation.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
for col in ${cols[@]} ; do
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -8,9 +8,8 @@ cmdDir=`dirname $0`
|
|||
source ${cmdDir}/commonFunctions.sh
|
||||
table=bufrascat
|
||||
|
||||
# table and constraint names form AScatObs.
|
||||
# table and constraint names from AScatObs.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=windSpd
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -8,9 +8,8 @@ cmdDir=`dirname $0`
|
|||
source ${cmdDir}/commonFunctions.sh
|
||||
table=bufrhdw
|
||||
|
||||
# table and constraint names form AScatObs.
|
||||
# table and constraint names from AScatObs.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=pressure
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -10,7 +10,6 @@ table=bufrssmi
|
|||
|
||||
# table and constraint names form BufrMTHDWObs.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=satid
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -10,7 +10,6 @@ table=ccfp
|
|||
|
||||
# table and constraint names from CcfpRecord.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=producttype
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -10,7 +10,6 @@ table=lsr
|
|||
|
||||
# table and constraint names form LocalStormReport.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
col=eventtype
|
||||
echo "Info Update ${table}'s ${col}"
|
||||
${PSQL} -U awips -d metadata -c "DELETE from ${table} where ${col} is NULL ; "
|
||||
|
|
|
@ -10,7 +10,6 @@ table=madis
|
|||
|
||||
# table and constraint names from MadisRecord.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
col=provider
|
||||
echo "Info Update ${table}'s ${col}"
|
||||
${PSQL} -U awips -d metadata -c "DELETE from ${table} where ${col} is NULL ; "
|
||||
|
|
|
@ -10,7 +10,6 @@ table=ldadmesonet
|
|||
|
||||
# table and constraint names form AScatObs.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=reportType
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -17,7 +17,6 @@ echo "INFO: Start update of tables derived from NPPSoundingRecord."
|
|||
for table in ${tables[@]} ; do
|
||||
if tableExists ${table} ; then
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
echo renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
for col in ${cols[@]} ; do
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
|
@ -9,10 +9,11 @@ source ${cmdDir}/commonFunctions.sh
|
|||
|
||||
# A table listed here doesn't need changes to any columns or the change
|
||||
# is handled in some other script.
|
||||
tables=("acarssounding" "binlightning" "bufrncwf" "bufrmosavn" "bufrmoseta" "bufrmosgfs" "bufrmoshpc"
|
||||
"bufrmoslamp" "bufrmosmrf" "bufrmosngm" "bufrquikscat" "bufrsigwx" "bufrua" "cwa" "cwat" "ffmp" "fog"
|
||||
"fssobs" "goessounding" "ldad_manual" "ldadhydro" "ldadprofiler" "modelsounding" "obs" "poessounding"
|
||||
"profiler" "qc" "sfcobs" "svrwx" "tcg" "tcs")
|
||||
tables=("acars" "acarssounding" "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" "ldad_manual" "ldadhydro" "ldadmesonet" "ldadprofiler" "lsr" "madis" "modelsounding"
|
||||
"nucaps" "obs" "poessounding"
|
||||
"practicewarning" "profiler" "qc" "sfcobs" "svrwx" "tcg" "tcs" "vaa" "warning")
|
||||
echo "INFO: rename tables unique constraints"
|
||||
|
||||
for table in ${tables[@]} ; do
|
||||
|
|
|
@ -10,7 +10,6 @@ table=vaa
|
|||
|
||||
# table and constraint names from VAARecord.
|
||||
echo "INFO: Start update of ${table} dataURI columns."
|
||||
renameConstraint ${table} uk_${table}_datauri_fields
|
||||
|
||||
col=advisorynumber
|
||||
echo "INFO: Update ${table}'s ${col}"
|
||||
|
|
Loading…
Add table
Reference in a new issue