blob: 0b0519a3df7d875563453d0ac88efa6ee5ee97bc [file] [log] [blame]
Michael Landof5f13c42017-02-19 12:35:04 +02001{
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)))",
talig8e9c0652017-12-20 14:30:43 +02008 "package_details": "CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version text,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)))",
Michael Landof5f13c42017-02-19 12:35:04 +02009 "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))",
10 "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))",
11 "application_config" : "CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key))",
12 "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)))",
13 "supportedComponents_index" : "CREATE INDEX IF NOT EXISTS action_supportedComponents ON dox.Action (supportedComponents)",
14 "category_list_index" : "CREATE INDEX IF NOT EXISTS action_category_list ON dox.Action (category_list)",
15 "supportedModels_index" : "CREATE INDEX IF NOT EXISTS action_supportedModels ON dox.Action (supportedModels)",
16 "vendor_list_index" : "CREATE INDEX IF NOT EXISTS action_vendor_list ON dox.Action (vendor_list)",
17 "actionUUID_index" : "CREATE INDEX IF NOT EXISTS action_actionUUID ON dox.Action (actionUUID)",
18 "ecomp_component": "CREATE TABLE IF NOT EXISTS dox.ecompcomponent(id text PRIMARY KEY, name text)",
Michael Landof5f13c42017-02-19 12:35:04 +020019 "name_index": "CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name)",
AviZi280f8012017-06-09 02:39:56 +030020 "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)",
AviZi280f8012017-06-09 02:39:56 +030021 "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))",
talig8e9c0652017-12-20 14:30:43 +020022 "healing" : "CREATE TABLE IF NOT EXISTS healing (space text,item_id text,version_id text, healing_needed boolean,old_version text, PRIMARY KEY((space,item_id),version_id))",
23 "migration": "CREATE TABLE IF NOT EXISTS migration (id text, ismigrated boolean, primary key (id))",
24 "item_permissions" : "CREATE TABLE IF NOT EXISTS item_permissions (item_id text,user_id text, permission text, PRIMARY KEY(item_id,user_id)) WITH CLUSTERING ORDER BY (user_id DESC)",
ayalaben8dfa8322018-04-10 13:43:01 +030025 "user_permission_items" : "CREATE TABLE IF NOT EXISTS user_permission_items (user_id text,permission text, item_list set<text>, PRIMARY KEY ((user_id), permission))",
talig8e9c0652017-12-20 14:30:43 +020026 "notification_subscribers": "CREATE TABLE IF NOT EXISTS NOTIFICATION_SUBSCRIBERS (entity_id text PRIMARY KEY, subscribers set<text>)",
27 "last_notification": "CREATE TABLE IF NOT EXISTS last_notification (owner_id text PRIMARY KEY, event_id timeuuid)",
28 "notifications": "CREATE TABLE IF NOT EXISTS notifications (owner_id text, event_id timeuuid, read boolean, originator_id text, event_type text, event_attributes text, PRIMARY KEY (owner_id, event_id)) WITH CLUSTERING ORDER BY (event_id DESC)",
29 "vsp_merge_hint": "CREATE TABLE IF NOT EXISTS vsp_merge_hint (space text, item_id text, version_id text, model_id text, model_resolution text, PRIMARY KEY ((space, item_id, version_id)))"
Michael Landof5f13c42017-02-19 12:35:04 +020030 },
31 "drop": {
Michael Landof5f13c42017-02-19 12:35:04 +020032 "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted",
33 "unique_value": "DROP TABLE IF EXISTS unique_value",
Michael Landof5f13c42017-02-19 12:35:04 +020034 "package_details": "DROP TABLE IF EXISTS package_details",
Michael Landof5f13c42017-02-19 12:35:04 +020035 "application_config" : "DROP TABLE IF EXISTS application_config",
Michael Landof5f13c42017-02-19 12:35:04 +020036 "vsp_enriched_service_artifact" :"DROP TABLE IF EXISTS vsp_enriched_service_artifact",
37 "vsp_enriched_service_template" :"DROP TABLE IF EXISTS vsp_enriched_service_template",
38 "action" : "DROP TABLE IF EXISTS action",
39 "supportedComponents_index" : "DROP INDEX IF EXISTS dox.action_supportedComponents",
40 "category_list_index" : "DROP INDEX IF EXISTS dox.action_category_list",
41 "supportedModels_index" : "DROP INDEX IF EXISTS dox.action_supportedModels",
42 "vendor_list_index" : "DROP INDEX IF EXISTS dox.action_vendor_list",
43 "actionUUID_index" : "DROP INDEX IF EXISTS dox.action_actionUUID",
44 "name_index" : "DROP INDEX IF EXISTS dox.action_name",
45 "ecomp_component": "DROP TABLE IF EXISTS dox.ecompcomponent",
AviZi280f8012017-06-09 02:39:56 +030046 "action_artifact":"DROP TABLE IF EXISTS action_artifact",
AviZi280f8012017-06-09 02:39:56 +030047 "activity_log": "DROP TABLE IF EXISTS activity_log",
talig8e9c0652017-12-20 14:30:43 +020048 "migration": "DROP TABLE IF EXISTS migration",
49 "item_permissions": "DROP TABLE IF EXISTS item_permissions",
ayalaben8dfa8322018-04-10 13:43:01 +030050 "user_permission_items" : "DROP TABLE IF EXISTS user_permission_items",
talig8e9c0652017-12-20 14:30:43 +020051 "notification_subscribers": "DROP TABLE IF EXISTS notification_subscribers",
52 "last_notification": "DROP TABLE IF EXISTS last_notification",
53 "notifications": "DROP TABLE IF EXISTS notifications",
54 "vsp_merge_hint": "DROP TABLE IF EXISTS vsp_merge_hint"
Michael Landof5f13c42017-02-19 12:35:04 +020055 },
56 "alter": {
AviZi280f8012017-06-09 02:39:56 +030057 },
58 "actions": {
59 "truncate_configuration": "truncate configuration"
Michael Landof5f13c42017-02-19 12:35:04 +020060 }
61}