Issue #1292 - delta scripts

Change-Id: Iec5eb9746e0531349b6bdbe70577125a7a6254d5

Former-commit-id: 11c98b66a2 [formerly 0f1643912c5713f556a931725a6ad4b75620a4df]
Former-commit-id: 623812116b
This commit is contained in:
Bryan Kowal 2012-11-27 14:04:24 -06:00
parent 5a5b7274ba
commit 3bfb3b93b3
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,22 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
\set ON_ERROR_STOP 1
\connect metadata;
CREATE SCHEMA events AUTHORIZATION awips;

View file

@ -0,0 +1,23 @@
#!/bin/bash
SQL_SCRIPT="createEventsSchema.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 - adding the events schema to the metadata database"
# 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