summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerry Flood <jflood@att.com>2020-02-11 06:20:54 -0500
committerJerry Flood <jflood@att.com>2020-02-12 06:00:51 -0500
commit673f9ae920aa038588c1e401d47cb885243a0f70 (patch)
tree5abcd7e5d44fd5d81db7b8d3da1c3da33cc9da2a
parent29482785f9e18a1100fe0ea4695dfaf348e60aa6 (diff)
Update schema creation to be schema agnostic
Issue-ID: OPTFRA-684 Change-Id: Idcb851c2ae16fdc7fd68e59fe9e23f25a2f7776b Signed-off-by: Jerry Flood <jflood@att.com>
-rw-r--r--cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1-schema.sql2
-rw-r--r--cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-add-uuid.sql1
-rw-r--r--cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-ids.sql1
-rw-r--r--cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-indices.sql1
-rw-r--r--cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-restore-indices.sql1
-rw-r--r--cmso-database/src/main/resources/optimizer-dbchanges/onap-optimizer-v1-schema.sql11
6 files changed, 5 insertions, 12 deletions
diff --git a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1-schema.sql b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1-schema.sql
index 470cb3d..3c75563 100644
--- a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1-schema.sql
+++ b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1-schema.sql
@@ -1,6 +1,4 @@
-CREATE DATABASE IF NOT EXISTS CMSO;
-USE CMSO;
CREATE TABLE IF NOT EXISTS DOMAINS (
domain VARCHAR(256) NOT NULL,
diff --git a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-add-uuid.sql b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-add-uuid.sql
index 639a030..b77490d 100644
--- a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-add-uuid.sql
+++ b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-add-uuid.sql
@@ -1,4 +1,3 @@
-USE CMSO;
-- Schedules Add UUID column
ALTER TABLE SCHEDULES ADD COLUMN uuid BINARY(16) NOT NULL FIRST;
diff --git a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-ids.sql b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-ids.sql
index 5522f64..b6df3ae 100644
--- a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-ids.sql
+++ b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-ids.sql
@@ -1,4 +1,3 @@
-USE CMSO;
-- --------------------------------------------------------------
-- DROP ALL OF THE INTENGER IDs
diff --git a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-indices.sql b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-indices.sql
index ec74432..75df726 100644
--- a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-indices.sql
+++ b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-drop-indices.sql
@@ -1,4 +1,3 @@
-USE CMSO;
-- -----------------------------------------------------
-- DROP THE FOREIGN KEYS THAT USE INT IDs
diff --git a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-restore-indices.sql b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-restore-indices.sql
index 0cb224a..19b9eca 100644
--- a/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-restore-indices.sql
+++ b/cmso-database/src/main/resources/cmso-dbchangelog/onap-cmso-v1.1-restore-indices.sql
@@ -1,4 +1,3 @@
-USE CMSO;
-- -----------------------------------------------------
-- UPDATE THE PRIMARY KEYS
diff --git a/cmso-database/src/main/resources/optimizer-dbchanges/onap-optimizer-v1-schema.sql b/cmso-database/src/main/resources/optimizer-dbchanges/onap-optimizer-v1-schema.sql
index d91a17e..803276a 100644
--- a/cmso-database/src/main/resources/optimizer-dbchanges/onap-optimizer-v1-schema.sql
+++ b/cmso-database/src/main/resources/optimizer-dbchanges/onap-optimizer-v1-schema.sql
@@ -1,6 +1,5 @@
-CREATE SCHEMA IF NOT EXISTS `optimizer` DEFAULT CHARACTER SET utf8 ;
-CREATE TABLE IF NOT EXISTS `optimizer`.`request` (
+CREATE TABLE IF NOT EXISTS `request` (
uuid BINARY(16) NOT NULL,
request LONGTEXT NOT NULL,
created_time BIGINT(20) NULL DEFAULT NULL,
@@ -12,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `optimizer`.`request` (
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-CREATE TABLE IF NOT EXISTS `optimizer`.`response` (
+CREATE TABLE IF NOT EXISTS `response` (
uuid BINARY(16) NOT NULL,
response LONGTEXT NULL DEFAULT NULL,
delivered_time BIGINT(20) NULL DEFAULT NULL,
@@ -21,7 +20,7 @@ ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-CREATE TABLE IF NOT EXISTS `optimizer`.`topology` (
+CREATE TABLE IF NOT EXISTS `topology` (
uuid BINARY(16) NOT NULL,
topology LONGTEXT NULL DEFAULT NULL,
topology_start BIGINT(20) NULL DEFAULT NULL,
@@ -32,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `optimizer`.`topology` (
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-CREATE TABLE IF NOT EXISTS `optimizer`.`tickets` (
+CREATE TABLE IF NOT EXISTS `tickets` (
uuid BINARY(16) NOT NULL,
tickets LONGTEXT NULL DEFAULT NULL,
tickets_start BIGINT(20) NULL DEFAULT NULL,
@@ -43,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `optimizer`.`tickets` (
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-CREATE TABLE IF NOT EXISTS `optimizer`.`optimizer` (
+CREATE TABLE IF NOT EXISTS `optimizer` (
uuid BINARY(16) NOT NULL,
optimize_response LONGTEXT NULL DEFAULT NULL,
optimize_start BIGINT(20) NULL DEFAULT NULL,