From c0f2c43b2074a3ef76b40c45803ce788ec79dce6 Mon Sep 17 00:00:00 2001
From: Jerry Flood <jflood@att.com>
Date: Fri, 15 Mar 2019 01:08:05 -0400
Subject: DB Schema update for Dublin

- Added optimizer schema
- updated cmso schema to use uuid PK

Issue-ID: OPTFRA-459
Change-Id: I1457b7d06b371298443a451af26e756d7b42f66c
Signed-off-by: Jerry Flood <jflood@att.com>
---
 .../optimizer-dbchanges/onap-cmso-v1-schema.sql    | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 cmso-database/src/main/resources/optimizer-dbchanges/onap-cmso-v1-schema.sql

(limited to 'cmso-database/src/main/resources/optimizer-dbchanges/onap-cmso-v1-schema.sql')

diff --git a/cmso-database/src/main/resources/optimizer-dbchanges/onap-cmso-v1-schema.sql b/cmso-database/src/main/resources/optimizer-dbchanges/onap-cmso-v1-schema.sql
new file mode 100644
index 0000000..d6e225b
--- /dev/null
+++ b/cmso-database/src/main/resources/optimizer-dbchanges/onap-cmso-v1-schema.sql
@@ -0,0 +1,51 @@
+CREATE SCHEMA IF NOT EXISTS `optimizer` DEFAULT CHARACTER SET utf8 ;
+
+CREATE TABLE IF NOT EXISTS `optimizer`.`request` (
+  uuid BINARY(16) NOT NULL,
+  request LONGTEXT NOT NULL,
+  created_time BIGINT(20) NULL DEFAULT NULL,
+  request_start BIGINT(20) NULL DEFAULT NULL,
+  request_end BIGINT(20) NULL DEFAULT NULL,
+  status VARCHAR(45) NULL DEFAULT NULL,
+  PRIMARY KEY (`uuid`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = utf8;
+
+CREATE TABLE IF NOT EXISTS `optimizer`.`response` (
+  uuid BINARY(16) NOT NULL,
+  repsonse LONGTEXT NULL DEFAULT NULL,
+  delivered_time BIGINT(20) NULL DEFAULT NULL,
+  PRIMARY KEY (`uuid`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = utf8;
+
+
+CREATE TABLE IF NOT EXISTS `optimizer`.`topology` (
+  uuid BINARY(16) NOT NULL,
+  topology LONGTEXT NULL DEFAULT NULL,
+  topology_start BIGINT(20) NULL DEFAULT NULL,
+  topology_end BIGINT(20) NULL DEFAULT NULL,
+  topology_retries INT NULL DEFAULT NULL,
+  PRIMARY KEY (`uuid`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = utf8;
+
+CREATE TABLE IF NOT EXISTS `optimizer`.`tickets` (
+  uuid BINARY(16) NOT NULL,
+  tickets LONGTEXT NULL DEFAULT NULL,
+  tickets_start BIGINT(20) NULL DEFAULT NULL,
+  tickets_end BIGINT(20) NULL DEFAULT NULL,
+  tickets_retries INT NULL DEFAULT NULL,
+  PRIMARY KEY (`uuid`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = utf8;
+
+CREATE TABLE IF NOT EXISTS `optimizer`.`optimizer` (
+  uuid BINARY(16) NOT NULL,
+  optimize_response LONGTEXT NULL DEFAULT NULL,
+  optimize_start BIGINT(20) NULL DEFAULT NULL,
+  optimize_end BIGINT(20) NULL DEFAULT NULL,
+  optimize_retries INT NULL DEFAULT NULL,
+  PRIMARY KEY (`uuid`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = utf8;
-- 
cgit 1.2.3-korg

