Omaha #4209 Create upgrade script for satellite spatial column data types.
Former-commit-id: 4b2f7af0f11140f0648ebfdfd8891ee839637ec8
This commit is contained in:
parent
4934064003
commit
9c4d7d1365
1 changed files with 22 additions and 0 deletions
22
deltaScripts/14.4.1/DR4209/updateSatSpatialDiffTypes.sh
Normal file
22
deltaScripts/14.4.1/DR4209/updateSatSpatialDiffTypes.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# DR #4209 - this update script will convert the satellite_spatial dx and dy columns to double precision
|
||||
# This is only necessary on sites installed before 14.2 but there is no harm running it everywhere.
|
||||
|
||||
PSQL="/awips2/psql/bin/psql"
|
||||
|
||||
echo "INFO: Updating satellite spatial table"
|
||||
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial ALTER COLUMN dx SET DATA TYPE double precision;"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to update column type for dx column of satellite_spatial table"
|
||||
echo "FATAL: The update has failed."
|
||||
exit 1
|
||||
fi
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial ALTER COLUMN dy SET DATA TYPE double precision;"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to update column type for dy column of satellite_spatial table"
|
||||
echo "FATAL: The update has failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: Satellite spatial table successfully updated."
|
Loading…
Add table
Reference in a new issue