From 7059a9c8aa100b51cab7698b09d80ec5acee584e Mon Sep 17 00:00:00 2001
From: "Sonsino, Ofir (os0695)" <os0695@intl.att.com>
Date: Wed, 5 Sep 2018 16:06:16 +0300
Subject: Upgrade portal SDK to 2.4

Change-Id: Idc9f16d3ee5aa546a6d7154d9e2190d6b96f314e
Issue-ID: VID-299
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
---
 epsdk-app-onap/src/main/resources/vid-schema.sql | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'epsdk-app-onap/src/main/resources/vid-schema.sql')

diff --git a/epsdk-app-onap/src/main/resources/vid-schema.sql b/epsdk-app-onap/src/main/resources/vid-schema.sql
index efd4d05f4..02de875b8 100755
--- a/epsdk-app-onap/src/main/resources/vid-schema.sql
+++ b/epsdk-app-onap/src/main/resources/vid-schema.sql
@@ -561,7 +561,10 @@ DEFAULT CHARACTER SET = utf8;
 CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_function` (
   `FUNCTION_CD` VARCHAR(30) NOT NULL,
   `FUNCTION_NAME` VARCHAR(50) NOT NULL,
-  PRIMARY KEY (`FUNCTION_CD`))
+  `type` VARCHAR(20) NOT NULL,
+  `action` VARCHAR(20) NOT NULL,
+  PRIMARY KEY (`FUNCTION_CD`),
+  CONSTRAINT `function` UNIQUE (FUNCTION_CD,TYPE,ACTION))
 ENGINE = InnoDB
 DEFAULT CHARACTER SET = utf8;
 
@@ -1380,5 +1383,4 @@ CREATE TABLE IF NOT EXISTS `vid_category_parameter_option` (
 -- View vid_openecomp_epsdk.v_url_access
 -- ----------------------------------------------------------------------------
 CREATE OR REPLACE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_url_access` AS select distinct `m`.`ACTION` AS `URL`,`m`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_menu` `m` where (`m`.`ACTION` is not null) union select distinct `t`.`ACTION` AS `URL`,`t`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_tab` `t` where (`t`.`ACTION` is not null) union select `r`.`RESTRICTED_URL` AS `URL`,`r`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_restricted_url` `r`;
-SET FOREIGN_KEY_CHECKS = 1;
-
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
-- 
cgit 1.2.3-korg

