From 7d93d9fffffc0cb9a9f432c10797269b8fd1ebd0 Mon Sep 17 00:00:00 2001
From: Brinda Santh <brindasanth@in.ibm.com>
Date: Thu, 12 Sep 2019 15:03:20 -0400
Subject: Blueprintprocessor Table change.

Change-Id: I42942ce06a65e994b67e6611ad93167a56c8fd7b
Issue-ID: CCSDK-1663
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
---
 .../src/main/resources/sql/schema-local.sql        | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

(limited to 'ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql')

diff --git a/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql b/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql
index ad048b017..05df4200a 100644
--- a/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql
+++ b/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql
@@ -6,8 +6,8 @@
 -- -----------------------------------------------------
 -- table CONFIG_MODEL
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL (
-  config_model_id 		INT(11) NOT NULL AUTO_INCREMENT,
+CREATE TABLE IF NOT EXISTS sdnctl.BLUEPRINT_MODEL (
+  blueprint_model_id 		VARCHAR(50) NOT NULL,
   service_uuid 			VARCHAR(50) NULL DEFAULT NULL,
   distribution_id 		VARCHAR(50) NULL DEFAULT NULL,
   service_name 			VARCHAR(255) NULL DEFAULT NULL,
@@ -27,25 +27,25 @@ CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL (
   published 			varchar(1) not null,
   updated_by 			varchar(100) not null,
   tags 				longtext null default null,
-  primary key PK_CONFIG_MODEL (config_model_id),
-  UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)
+  primary key PK_BLUEPRINT_MODEL (blueprint_model_id),
+  UNIQUE KEY UK_BLUEPRINT_MODEL (artifact_name , artifact_version)
 ) ENGINE=InnoDB;
 
 
 -- -----------------------------------------------------
 -- table CONFIG_MODEL_CONTENT
 -- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL_CONTENT (
-  config_model_content_id 	INT(11) NOT NULL AUTO_INCREMENT, 
-  config_model_id 		INT NOT NULL,
+CREATE TABLE IF NOT EXISTS sdnctl.BLUEPRINT_MODEL_CONTENT (
+  blueprint_model_content_id 	VARCHAR(50) NOT NULL,
+  blueprint_model_id 		VARCHAR(50) NOT NULL,
   name 				VARCHAR(100) NOT NULL,
   content_type 			VARCHAR(50) NOT NULL,
   description 			LONGTEXT NULL DEFAULT NULL,
   updated_date 			DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  content 			LONGTEXT NULL DEFAULT NULL,
-  PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),
-  UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),
-  FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES sdnctl.CONFIG_MODEL(config_model_id) ON DELETE CASCADE
+  content 			LONGBLOB NULL DEFAULT NULL,
+  PRIMARY KEY PK_BLUEPRINT_MODEL_CONTENT (blueprint_model_content_id),
+  UNIQUE KEY UK_BLUEPRINT_MODEL_CONTENT (blueprint_model_id, name, content_type),
+  FOREIGN KEY FK_BLUEPRINT_MODEL_CONTENT (blueprint_model_id) REFERENCES sdnctl.BLUEPRINT_MODEL(blueprint_model_id) ON DELETE CASCADE
 ) ENGINE=InnoDB;
 
 -- -----------------------------------------------------
-- 
cgit 1.2.3-korg

