diff options
author | 2020-11-11 13:13:42 -0500 | |
---|---|---|
committer | 2020-11-11 13:13:42 -0500 | |
commit | 42624f16cadb0e6bf1c4f9317c4c287a274a1c89 (patch) | |
tree | b1890dd2ffdb090d7ac2a6b24bcd2e8bdcd2cbd2 /ms/neng/src/test | |
parent | 3504bad8d098ce09340a93e7916b20ae422d4497 (diff) |
Fix initialization errors
Updated database initialization to correctly handle differences
between mysql/mariadb syntax and h2 syntax.
Change-Id: I6f2732da5d26201fc61ef8de7d30e3137220c184
Issue-ID: CCSDK-2978
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/neng/src/test')
-rw-r--r-- | ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml | 4 | ||||
-rw-r--r-- | ms/neng/src/test/resources/h2db/changelog/scripts/rel_18_10/create_base_tables.sql | 53 |
2 files changed, 55 insertions, 2 deletions
diff --git a/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml b/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml index 2826e4d4..6f8eab44 100644 --- a/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml +++ b/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml @@ -24,11 +24,11 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"> - <include file="db/changelog/scripts/rel_18_10/create_base_tables.sql" /> + <include file="h2db/changelog/scripts/rel_18_10/create_base_tables.sql" /> <include file="db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql" /> <include file="db/changelog/scripts/rel_18_10/02_create_indexes_ddl.sql" /> <include file="db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql" /> <include file="h2db/changelog/scripts/50_load_sim_data_dml.sql" /> <include file="h2db/changelog/scripts/51_ref_data_upd_dml.sql" /> -</databaseChangeLog>
\ No newline at end of file +</databaseChangeLog> diff --git a/ms/neng/src/test/resources/h2db/changelog/scripts/rel_18_10/create_base_tables.sql b/ms/neng/src/test/resources/h2db/changelog/scripts/rel_18_10/create_base_tables.sql new file mode 100644 index 00000000..d58a01a6 --- /dev/null +++ b/ms/neng/src/test/resources/h2db/changelog/scripts/rel_18_10/create_base_tables.sql @@ -0,0 +1,53 @@ +--liquibase formatted sql +--changeset template_table:18_10.create_tables_p1.sql + +CREATE TABLE GENERATED_NAME (GENERATED_NAME_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), +EXTERNAL_ID VARCHAR(500) NOT NULL COMMENT 'Key sent by SDNC', +SEQUNCE_NUMBER INTEGER COMMENT 'Sequence number used for this name', +SEQUENCE_NUMBER_ENC VARCHAR(100) COMMENT 'Alpha numeric equivalent of sequence_number column', +ELEMENT_TYPE VARCHAR(100) COMMENT 'The type of network element vnf-name, vm-name etc', +NAME VARCHAR(500) COMMENT 'Generated name', +PREFIX VARCHAR(100) COMMENT 'The prefix for the name. (The part of the name before the sequence number.)', +SUFFIX VARCHAR(100) COMMENT 'The suffix for the name. (The part of the name after the sequence number.)', +IS_RELEASED CHAR(1) COMMENT 'Indicating if the entry is released/unassigned', +CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, +CREATED_BY VARCHAR(50), +LAST_UPDATED_TIME DATETIME, +LAST_UPDATED_BY VARCHAR(50) +); +-- COMMENT 'TABLE TO STORE GENERATED NAMES'; + +CREATE TABLE SERVICE_PARAMETER (SERVICE_PARAMETER_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), +NAME VARCHAR(500) NOT NULL COMMENT 'Parameter name', +VALUE VARCHAR(500) COMMENT 'Parameter value', +CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, +CREATED_BY VARCHAR(50), +LAST_UPDATED_TIME DATETIME, +LAST_UPDATED_BY VARCHAR(50) +); + +CREATE TABLE IDENTIFIER_MAP (IDENTIFIER_MAP_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), +POLICY_FN_NAME VARCHAR(500) COMMENT 'Function name in policy manager' NOT NULL, +JS_FN_NAME VARCHAR(500) COMMENT 'Equivalent name in Java or script', +CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, +CREATED_BY VARCHAR(50), +LAST_UPDATED_TIME DATETIME, +LAST_UPDATED_BY VARCHAR(50) +); + + +CREATE TABLE EXTERNAL_INTERFACE (EXTERNAL_INTERFACE_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), +SYSTEM VARCHAR(500) COMMENT 'Name of the external system', +PARAM VARCHAR(500) COMMENT 'Parameters controlling the url', +URL_SUFFIX VARCHAR(500) COMMENT 'The suffix of the URL for each value of the parameter', +CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, +CREATED_BY VARCHAR(50), +LAST_UPDATED_TIME DATETIME, +LAST_UPDATED_BY VARCHAR(50) +); + +CREATE TABLE POLICY_MAN_SIM (POLICY_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), +POLICY_NAME VARCHAR(500) COMMENT 'Policy name' NOT NULL, +POLICY_RESPONSE VARCHAR(10000) COMMENT 'Policy value', +CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP +); |