aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-12-13 17:28:53 +0000
committerGerrit Code Review <gerrit@onap.org>2021-12-13 17:28:53 +0000
commita2559288011505d71ae30af6402592ca9c572cf3 (patch)
treef52e3ee553b25f0879a4eb3d30befb18b24470db /kubernetes/holmes/components/holmes-engine-mgmt/resources/config/onap-holmes_engine-createobj.sql
parent47685192241e4cd70762c7e792416f63eddc2dd8 (diff)
parenta76304bc97333b48079c55ae5a974300d9bf8327 (diff)
Merge "[HOLMES] Alter table to align with Ves 7.1 changes in Holmes-ms"
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 (