awips2/deltaScripts/13.2.1/aggregateRecordGroupingLength.sh
Dustin Johnson 4ab214c5d7 Issue #1487 Use XML to store stats grouping information in the database
Amend:
  Increase length of grouping column to 1024.
  Add deltaScript to convert the grouping column to xml.
  Change regex to replace any pluginName fields with dashes, not just satellite-mcidas.

Change-Id: I0d5081645c5f11909e5778c8e555d5da3cf77e1a

Former-commit-id: c12b46027f [formerly b627dfc054] [formerly c12b46027f [formerly b627dfc054] [formerly 19d3a14d4f [formerly 38ecb1f36dce4717d0ba9066c8cd22116770d34b]]]
Former-commit-id: 19d3a14d4f
Former-commit-id: ecb1d5564a [formerly c750e27389]
Former-commit-id: 19558ae3fa
2013-01-16 12:21:11 -06:00

23 lines
564 B
Bash

#!/bin/bash
SQL_SCRIPT="increaseAggregateRecordGroupingLength.sql"
# ensure that the sql script is present
if [ ! -f ${SQL_SCRIPT} ]; then
echo "ERROR: the required sql script - ${SQL_SCRIPT} was not found."
echo "FATAL: the update has failed!"
exit 1
fi
echo "INFO: update started - increasing the size of the aggregate.grouping column"
# run the update
/awips2/psql/bin/psql -U awips -d metadata -f ${SQL_SCRIPT}
if [ $? -ne 0 ]; then
echo "FATAL: the update has failed!"
exit 1
fi
echo "INFO: the update has completed successfully!"
exit 0