summaryrefslogtreecommitdiffstats
path: root/kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql')
-rw-r--r--kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql9
1 files changed, 4 insertions, 5 deletions
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 (