From a76304bc97333b48079c55ae5a974300d9bf8327 Mon Sep 17 00:00:00 2001 From: Venkata Molluru Date: Fri, 10 Dec 2021 04:23:07 +0000 Subject: [HOLMES] Alter table to align with Ves 7.1 changes in Holmes-ms Table altered in Holmes-ms, same to be aligned in helm chart Issue-ID: HOLMES-308 Signed-off-by: Venkata Molluru Change-Id: I6a2a93fbcf232639c9f3d2853a91011a0f70673f --- .../resources/config/onap-holmes_engine-createobj.sql | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'kubernetes/holmes') diff --git a/kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql b/kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql index 81998453e4..e5eecb1a5a 100644 --- a/kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql +++ b/kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql @@ -22,12 +22,10 @@ CREATE ROLE ${JDBC_USERNAME} with PASSWORD '${JDBC_PASSWORD}' LOGIN; \encoding UTF8; -/******************DELETE OLD TABLE AND CREATE NEW***************************/ +/******************CREATE NEW TABLE***************************/ \c ${DB_NAME}; -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, @@ -36,7 +34,8 @@ CREATE TABLE ALARM_INFO ( LASTEPOCHMICROSEC BIGINT NOT NULL, SOURCEID VARCHAR(150) NOT NULL, SOURCENAME VARCHAR(150) NOT NULL, - PRIMARY KEY (EVENTID) + SEQUENCE SMALLINT NOT NULL, + PRIMARY KEY (EVENTID, SEQUENCE, SOURCENAME) ); CREATE TABLE IF NOT EXISTS ENGINE_ENTITY ( -- cgit 1.2.3-korg