From ed04622cea4a463b226bafb20eb5d8f76e0f2de9 Mon Sep 17 00:00:00 2001 From: BT2983 Date: Tue, 24 Jul 2018 07:41:16 -0600 Subject: Adding naming micro-service code - scripts-2. Refactor DB scripts. Change-Id: I9a9a2f57435a73f7adb35c388d33dad1f9316e75 Issue-ID: CCSDK-342 Signed-off-by: BT2983 --- .../scripts/rel_18_10/03_ref_data_upd_dml.sql | 8 -------- .../scripts/rel_18_10/05_ref_data_upd_dml.sql | 5 ----- .../scripts/rel_18_10/06_ref_data_upd_dml.sql | 9 --------- .../rel_18_10/07_ref_data_extrn_int_update_dml.sql | 21 --------------------- .../rel_18_10/08_ref_data_extrn_int_update_dml.sql | 12 ------------ .../scripts/rel_18_10/09_table_upd_ddl.sql | 4 ---- .../scripts/rel_18_10/10_ref_data_upd_dml.sql | 5 ----- 7 files changed, 64 deletions(-) delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/03_ref_data_upd_dml.sql delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/05_ref_data_upd_dml.sql delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/06_ref_data_upd_dml.sql delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/07_ref_data_extrn_int_update_dml.sql delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/08_ref_data_extrn_int_update_dml.sql delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/09_table_upd_ddl.sql delete mode 100644 ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/10_ref_data_upd_dml.sql diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/03_ref_data_upd_dml.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/03_ref_data_upd_dml.sql deleted file mode 100644 index 2c33bb09..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/03_ref_data_upd_dml.sql +++ /dev/null @@ -1,8 +0,0 @@ ---liquibase formatted sql ---changeset ref_data_update:18_10.ref_data_update.sql - -INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('max_gen_attempt','50','Initial'); - -delete from IDENTIFIER_MAP; - -INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('sub_str','substr', 'Initial'); diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/05_ref_data_upd_dml.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/05_ref_data_upd_dml.sql deleted file mode 100644 index 34bd6dc3..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/05_ref_data_upd_dml.sql +++ /dev/null @@ -1,5 +0,0 @@ ---liquibase formatted sql ---changeset ref_data_update:18_10.ref_data_update.sql - -INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('substr','substr', 'Initial'); -INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('use_db_policy','Y','Initial'); diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/06_ref_data_upd_dml.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/06_ref_data_upd_dml.sql deleted file mode 100644 index da4e1ba3..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/06_ref_data_upd_dml.sql +++ /dev/null @@ -1,9 +0,0 @@ ---liquibase formatted sql ---changeset ref_data_update_more:18_10.ref_data_update_more.sql - --- update policy functions to java implementations - -UPDATE IDENTIFIER_MAP SET JS_FN_NAME = 'substring' WHERE POLICY_FN_NAME='sub_str'; -UPDATE IDENTIFIER_MAP SET JS_FN_NAME = 'substring' WHERE POLICY_FN_NAME='substr'; -INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('to_lower_case','toLowerCase', 'Initial'); -INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('to_upper_case','toUpperCase', 'Initial'); diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/07_ref_data_extrn_int_update_dml.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/07_ref_data_extrn_int_update_dml.sql deleted file mode 100644 index 749076c9..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/07_ref_data_extrn_int_update_dml.sql +++ /dev/null @@ -1,21 +0,0 @@ ---liquibase formatted sql ---changeset ref_data_update_extin:18_10.ref_data_update.sql - --- clean up any data -delete from external_interface where PARAM in ('VNF', 'VNFC', 'VM', 'VFMODULE'); - ---insert the data - -insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) -values('aai','VNF','nodes/generic-vnfs?vnf-name=',sysdate(),'nengsys',sysdate(),'nengsys'); - -insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) -values('aai','VNFC','nodes/vnfcs?vnfc-name=',sysdate(),'nengsys',sysdate(),'nengsys'); - -insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) -values('aai','VM','nodes/vservers?vserver-name=',sysdate(),'nengsys',sysdate(),'nengsys'); - -insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) -values('aai','VFMODULE','nodes/vf-modules?vf-module-name=',sysdate(),'nengsys',sysdate(),'nengsys'); - -commit; diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/08_ref_data_extrn_int_update_dml.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/08_ref_data_extrn_int_update_dml.sql deleted file mode 100644 index 36935c29..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/08_ref_data_extrn_int_update_dml.sql +++ /dev/null @@ -1,12 +0,0 @@ ---liquibase formatted sql ---changeset ref_data_update_extin:18_10.ref_data_update.sql - --- clean up any data -delete from external_interface where PARAM in ('VF-MODULE'); - ---insert the data - -insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) -values('aai','VF-MODULE','nodes/vf-modules?vf-module-name=',sysdate(),'nengsys',sysdate(),'nengsys'); - -commit; diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/09_table_upd_ddl.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/09_table_upd_ddl.sql deleted file mode 100644 index eccd921f..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/09_table_upd_ddl.sql +++ /dev/null @@ -1,4 +0,0 @@ ---liquibase formatted sql ---changeset generate_name_ddl_update:18_10.table_update.sql - -alter table generated_name MODIFY COLUMN created_time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;; diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/10_ref_data_upd_dml.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/10_ref_data_upd_dml.sql deleted file mode 100644 index b589a986..00000000 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/10_ref_data_upd_dml.sql +++ /dev/null @@ -1,5 +0,0 @@ ---liquibase formatted sql ---changeset service_param_update_sql:18_10.ref_update.sql - -DELETE FROM SERVICE_PARAMETER where NAME='use_db_policy'; -INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('use_db_policy','N','Initial'); -- cgit 1.2.3-korg