Former-commit-id:91fb128c17
[formerly9fdd0e51a0
] [formerly91fb128c17
[formerly9fdd0e51a0
] [formerlybae0a20b8e
[formerly 51ecc8e9e15940e6cbe2c5da55edc5860ea8b0ca]]] Former-commit-id:bae0a20b8e
Former-commit-id:8ac02ce922
[formerlyc666ac7283
] Former-commit-id:ccc5095251
22 lines
829 B
Bash
Executable file
22 lines
829 B
Bash
Executable file
#!/bin/bash
|
|
# DR #2275 - this script is needd to add the dataURI column back into the
|
|
# bufrmosavn and bufrmoshpc tables.
|
|
|
|
PSQL="/awips2/psql/bin/psql"
|
|
|
|
${PSQL} -U awips -d metadata -c "ALTER TABLE bufrmosavn ADD COLUMN datauri character varying(255);"
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to drop dataURI column for bufrmosavn"
|
|
echo "FATAL: The update has failed."
|
|
exit 1
|
|
fi
|
|
${PSQL} -U awips -d metadata -c "ALTER TABLE bufrmoshpc ADD COLUMN datauri character varying(255);"
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to add dataURI column for bufrmoshpc"
|
|
echo "FATAL: The update has failed."
|
|
exit 1
|
|
fi
|
|
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmosavn"
|
|
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmoshpc"
|
|
|
|
echo "INFO: dataURI columns added successfully"
|