Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 1 | { |
| 2 | "create": { |
| 3 | "version": "CREATE TYPE IF NOT EXISTS version (major int, minor int)", |
| 4 | "user_candidate_version": "CREATE TYPE IF NOT EXISTS user_candidate_version (version frozen<version>, user text)", |
| 5 | "version_info": "CREATE TABLE IF NOT EXISTS version_info (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id))", |
| 6 | "version_info_deleted": "CREATE TABLE IF NOT EXISTS version_info_deleted (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id))", |
| 7 | "unique_value" : "CREATE TABLE IF NOT EXISTS unique_value (type text, value text, PRIMARY KEY ((type, value)))", |
| 8 | "choice_or_other": "CREATE TYPE IF NOT EXISTS choice_or_other (result text)", |
| 9 | "multi_choice_or_other": "CREATE TYPE IF NOT EXISTS multi_choice_or_other (results set<text>)", |
| 10 | "vendor_license_model": "CREATE TABLE IF NOT EXISTS vendor_license_model (vlm_id text, version frozen<version>, vendor_name text, description text, icon text, PRIMARY KEY ((vlm_id, version)))", |
| 11 | "license_agreement": "CREATE TABLE IF NOT EXISTS license_agreement (vlm_id text, version frozen<version>, la_id text, name text, description text, lic_term frozen<choice_or_other>, req_const text, fg_ids set<text>, PRIMARY KEY ((vlm_id, version), la_id))", |
| 12 | "feature_group": "CREATE TABLE IF NOT EXISTS feature_group (vlm_id text, version frozen<version>, fg_id text, name text, description text, part_num text, ep_ids set<text>, lkg_ids set<text>, ref_la_ids set<text>, PRIMARY KEY ((vlm_id, version), fg_id))", |
| 13 | "license_key_group": "CREATE TABLE IF NOT EXISTS license_key_group (vlm_id text, version frozen<version>, lkg_id text,name text,description text, type text, operational_scope frozen<multi_choice_or_other>, ref_fg_ids set<text>, version_uuid text, PRIMARY KEY ((vlm_id, version), lkg_id))", |
| 14 | "entitlement_pool": "CREATE TABLE IF NOT EXISTS entitlement_pool (vlm_id text, version frozen<version>, ep_id text,name text,description text,threshold float,threshold_unit text,entitlement_metric frozen<choice_or_other>,increments text,aggregation_func frozen<choice_or_other>, operational_scope frozen<multi_choice_or_other>, time frozen<choice_or_other>,manufacturer_ref_num text,ref_fg_ids set<text>, version_uuid text, PRIMARY KEY ((vlm_id, version), ep_id))", |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 15 | "vsp_information": "CREATE TABLE IF NOT EXISTS vsp_information (VSP_ID text, version frozen<version>, NAME text,DESCRIPTION text,CATEGORY text,SUB_CATEGORY text,ICON text,PACKAGE_NAME text,PACKAGE_VERSION text,vendor_name text, vendor_id text,LICENSE_AGREEMENT text,FEATURE_GROUPS list<text>,VALIDATION_DATA text,CONTENT_DATA blob, questionnaire_data text, vlm_version frozen<version>, is_old_version text, onboarding_method text, PRIMARY KEY ((VSP_ID, version)))", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 16 | "package_details": "CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version frozen<version>,DISPLAY_NAME text,vsp_name text,vsp_description text,VENDOR_NAME text,CATEGORY text,SUB_CATEGORY text,VENDOR_RELEASE text,PACKAGE_CHECKSUM text,PACKAGE_TYPE text,TRANSLATE_CONTENT blob,PRIMARY KEY ((VSP_ID, version)))", |
| 17 | "vsp_network": "CREATE TABLE IF NOT EXISTS vsp_network (vsp_id text, version frozen<version>, network_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), network_id))", |
| 18 | "vsp_component": "CREATE TABLE IF NOT EXISTS vsp_component (vsp_id text, version frozen<version>, component_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id))", |
| 19 | "vsp_component_nic": "CREATE TABLE IF NOT EXISTS vsp_component_nic (vsp_id text, version frozen<version>, component_id text, nic_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, nic_id))", |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 20 | "vsp_component_image": "CREATE TABLE IF NOT EXISTS vsp_component_image (vsp_id text, version frozen<version>, component_id text, image_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, image_id))", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 21 | "vsp_process" : "CREATE TABLE IF NOT EXISTS vsp_process (vsp_id text, version frozen<version>, component_id text, process_id text, name text, description text, type text, artifact_name text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, process_id))", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 22 | "vsp_service_artifact" : "CREATE TABLE IF NOT EXISTS vsp_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", |
| 23 | "vsp_service_template" : "CREATE TABLE IF NOT EXISTS vsp_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", |
| 24 | "vsp_enriched_service_template" : "CREATE TABLE IF NOT EXISTS vsp_enriched_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", |
| 25 | "vsp_enriched_service_artifact" : "CREATE TABLE IF NOT EXISTS vsp_enriched_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", |
| 26 | "application_config" : "CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key))", |
| 27 | "action" : "CREATE TABLE IF NOT EXISTS dox.Action (actionUUID text, actionInvariantUUID text, version frozen<version>, status text, name text, vendor_list set<text>, category_list set<text>, timestamp timestamp, user text, supportedModels set<text>, supportedComponents set<text>, data text, PRIMARY KEY ((actionInvariantUUID, version)))", |
| 28 | "supportedComponents_index" : "CREATE INDEX IF NOT EXISTS action_supportedComponents ON dox.Action (supportedComponents)", |
| 29 | "category_list_index" : "CREATE INDEX IF NOT EXISTS action_category_list ON dox.Action (category_list)", |
| 30 | "supportedModels_index" : "CREATE INDEX IF NOT EXISTS action_supportedModels ON dox.Action (supportedModels)", |
| 31 | "vendor_list_index" : "CREATE INDEX IF NOT EXISTS action_vendor_list ON dox.Action (vendor_list)", |
| 32 | "actionUUID_index" : "CREATE INDEX IF NOT EXISTS action_actionUUID ON dox.Action (actionUUID)", |
| 33 | "ecomp_component": "CREATE TABLE IF NOT EXISTS dox.ecompcomponent(id text PRIMARY KEY, name text)", |
| 34 | "vsp_component_artifact": "CREATE TABLE IF NOT EXISTS vsp_component_artifact (vsp_id text, version frozen<version>, component_id text, artifact_type text, artifact_id text, name text, description text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, artifact_type, artifact_id))", |
| 35 | "name_index": "CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name)", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 36 | "action_artifact":"CREATE TABLE IF NOT EXISTS action_artifact(artifactuuid text, effective_version int, artifact blob, PRIMARY KEY(artifactuuid, effective_version)) WITH CLUSTERING ORDER BY (effective_version DESC)", |
| 37 | "vsp_orchestration_template_candidate" : "CREATE TABLE IF NOT EXISTS vsp_orchestration_template_candidate (vsp_id text, version frozen<version>, files_data_structure text, content_data blob, PRIMARY KEY ((vsp_id, version)))", |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 38 | "vsp_deployment_flavor" : "CREATE TABLE IF NOT EXISTS vsp_deployment_flavor (vsp_id text, version frozen<version>, deployment_flavor_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), deployment_flavor_id))", |
| 39 | "vsp_component_compute": "CREATE TABLE IF NOT EXISTS vsp_component_compute (vsp_id text, version frozen<version>, component_id text, compute_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, compute_id))", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 40 | "vsp_component_dependency_model" : "CREATE TABLE IF NOT EXISTS vsp_component_dependency_model (vsp_id text, version frozen<version>, dependency_id text, sourcecomponent_id text, targetcomponent_id text, relation text, PRIMARY KEY ((vsp_id, version), dependency_id))", |
| 41 | "activity_log" : "CREATE TABLE IF NOT EXISTS activity_log (item_id text, version_id text, activity_id text, type text, user text, timestamp timestamp, success boolean, message text, comment text, PRIMARY KEY (item_id, version_id, activity_id))", |
| 42 | "migration": "CREATE TABLE IF NOT EXISTS migration (id text, ismigrated boolean, primary key(id))" |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 43 | }, |
| 44 | "drop": { |
| 45 | "version_info": "DROP TABLE IF EXISTS version_info", |
| 46 | "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted", |
| 47 | "unique_value": "DROP TABLE IF EXISTS unique_value", |
| 48 | "entitlement_pool": "DROP TABLE IF EXISTS entitlement_pool", |
| 49 | "vendor_license_model": "DROP TABLE IF EXISTS vendor_license_model", |
| 50 | "license_agreement": "DROP TABLE IF EXISTS license_agreement", |
| 51 | "feature_group": "DROP TABLE IF EXISTS feature_group", |
| 52 | "license_key_group": "DROP TABLE IF EXISTS license_key_group", |
| 53 | "vsp_information": "DROP TABLE IF EXISTS vsp_information", |
| 54 | "package_details": "DROP TABLE IF EXISTS package_details", |
| 55 | "vsp_network": "DROP TABLE IF EXISTS vsp_network", |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 56 | "vsp_component_image": "DROP TABLE IF EXISTS vsp_component_image", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 57 | "vsp_component": "DROP TABLE IF EXISTS vsp_component", |
| 58 | "vsp_component_nic": "DROP TABLE IF EXISTS vsp_component_nic", |
| 59 | "vsp_process":"DROP TABLE IF EXISTS vsp_process", |
| 60 | "choice_or_other": "DROP TYPE IF EXISTS choice_or_other", |
| 61 | "multi_choice_or_other": "DROP TYPE IF EXISTS multi_choice_or_other", |
| 62 | "application_config" : "DROP TABLE IF EXISTS application_config", |
| 63 | "vsp_service_artifact" :"DROP TABLE IF EXISTS vsp_service_artifact", |
| 64 | "vsp_service_template" :"DROP TABLE IF EXISTS vsp_service_template", |
| 65 | "vsp_enriched_service_artifact" :"DROP TABLE IF EXISTS vsp_enriched_service_artifact", |
| 66 | "vsp_enriched_service_template" :"DROP TABLE IF EXISTS vsp_enriched_service_template", |
| 67 | "action" : "DROP TABLE IF EXISTS action", |
| 68 | "supportedComponents_index" : "DROP INDEX IF EXISTS dox.action_supportedComponents", |
| 69 | "category_list_index" : "DROP INDEX IF EXISTS dox.action_category_list", |
| 70 | "supportedModels_index" : "DROP INDEX IF EXISTS dox.action_supportedModels", |
| 71 | "vendor_list_index" : "DROP INDEX IF EXISTS dox.action_vendor_list", |
| 72 | "actionUUID_index" : "DROP INDEX IF EXISTS dox.action_actionUUID", |
| 73 | "name_index" : "DROP INDEX IF EXISTS dox.action_name", |
| 74 | "ecomp_component": "DROP TABLE IF EXISTS dox.ecompcomponent", |
| 75 | "vsp_component_artifact": "DROP TABLE IF EXISTS dox.vsp_component_artifact", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 76 | "action_artifact":"DROP TABLE IF EXISTS action_artifact", |
| 77 | "vsp_orchestration_template_candidate":"DROP TABLE IF EXISTS vsp_orchestration_template_candidate", |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 78 | "vsp_deployment_flavor":"DROP TABLE IF EXISTS vsp_deployment_flavor", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 79 | "vsp_component_dependency_model":"DROP TABLE IF EXISTS vsp_component_dependency_model", |
| 80 | "activity_log": "DROP TABLE IF EXISTS activity_log", |
| 81 | "migration": "DROP TABLE IF EXISTS migration" |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 82 | }, |
| 83 | "alter": { |
| 84 | "vsp_information": "ALTER TABLE vsp_information ADD questionnaire_data text", |
| 85 | "vsp_information_1": "ALTER TABLE vsp_information ADD vlm_version frozen<version>", |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 86 | "vsp_information_2": "ALTER TABLE vsp_information ADD onboarding_method text", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 87 | "vsp_process": "ALTER TABLE vsp_process ADD type text", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 88 | "entitlement_pool": "alter table entitlement_pool ADD version_uuid text", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 89 | "license_key_group": "alter table license_key_group ADD version_uuid text", |
| 90 | "application_config": "delete from application_config where namespace='vsp.monitoring' and key = 'component.ceilometer'" |
| 91 | }, |
| 92 | "actions": { |
| 93 | "truncate_configuration": "truncate configuration" |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 94 | } |
| 95 | } |