From bffabda06aa6c5b8027ecdc98f812df2d2c45cba Mon Sep 17 00:00:00 2001 From: Venkata Molluru Date: Tue, 9 Nov 2021 08:03:02 +0000 Subject: Fix to prevent recreating ALARM_INFO table if exists Issue-ID: HOLMES-491 Change-Id: Iaf2dca7c2e2e8fe21b3a7176ebb81501d76ac414 Signed-off-by: Venkata Molluru --- .../assembly/dbscripts/postgresql/onap-holmes_engine-createobj.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine-d-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_engine-createobj.sql b/engine-d-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_engine-createobj.sql index 6831ce2..a3975b3 100644 --- a/engine-d-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_engine-createobj.sql +++ b/engine-d-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_engine-createobj.sql @@ -25,9 +25,7 @@ CREATE ROLE DBUSER with PASSWORD 'DBPWD' LOGIN; /******************DELETE OLD TABLE AND CREATE NEW***************************/ \c DBNAME; -DROP TABLE IF EXISTS ALARM_INFO; - -CREATE TABLE ALARM_INFO ( +CREATE TABLE IF NOT EXISTS ALARM_INFO ( EVENTID VARCHAR(150) NOT NULL, EVENTNAME VARCHAR(150) NOT NULL, ALARMISCLEARED SMALLINT NOT NULL, -- cgit 1.2.3-korg