blob: 34916fe74dc17a5c1fde91e4863234c3cd00b1c4 [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)",
25 "notification_subscribers": "CREATE TABLE IF NOT EXISTS NOTIFICATION_SUBSCRIBERS (entity_id text PRIMARY KEY, subscribers set<text>)",
26 "last_notification": "CREATE TABLE IF NOT EXISTS last_notification (owner_id text PRIMARY KEY, event_id timeuuid)",
27 "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)",
28 "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 +020029 },
30 "drop": {
Michael Landof5f13c42017-02-19 12:35:04 +020031 "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted",
32 "unique_value": "DROP TABLE IF EXISTS unique_value",
Michael Landof5f13c42017-02-19 12:35:04 +020033 "package_details": "DROP TABLE IF EXISTS package_details",
Michael Landof5f13c42017-02-19 12:35:04 +020034 "application_config" : "DROP TABLE IF EXISTS application_config",
Michael Landof5f13c42017-02-19 12:35:04 +020035 "vsp_enriched_service_artifact" :"DROP TABLE IF EXISTS vsp_enriched_service_artifact",
36 "vsp_enriched_service_template" :"DROP TABLE IF EXISTS vsp_enriched_service_template",
37 "action" : "DROP TABLE IF EXISTS action",
38 "supportedComponents_index" : "DROP INDEX IF EXISTS dox.action_supportedComponents",
39 "category_list_index" : "DROP INDEX IF EXISTS dox.action_category_list",
40 "supportedModels_index" : "DROP INDEX IF EXISTS dox.action_supportedModels",
41 "vendor_list_index" : "DROP INDEX IF EXISTS dox.action_vendor_list",
42 "actionUUID_index" : "DROP INDEX IF EXISTS dox.action_actionUUID",
43 "name_index" : "DROP INDEX IF EXISTS dox.action_name",
44 "ecomp_component": "DROP TABLE IF EXISTS dox.ecompcomponent",
AviZi280f8012017-06-09 02:39:56 +030045 "action_artifact":"DROP TABLE IF EXISTS action_artifact",
AviZi280f8012017-06-09 02:39:56 +030046 "activity_log": "DROP TABLE IF EXISTS activity_log",
talig8e9c0652017-12-20 14:30:43 +020047 "migration": "DROP TABLE IF EXISTS migration",
48 "item_permissions": "DROP TABLE IF EXISTS item_permissions",
49 "notification_subscribers": "DROP TABLE IF EXISTS notification_subscribers",
50 "last_notification": "DROP TABLE IF EXISTS last_notification",
51 "notifications": "DROP TABLE IF EXISTS notifications",
52 "vsp_merge_hint": "DROP TABLE IF EXISTS vsp_merge_hint"
Michael Landof5f13c42017-02-19 12:35:04 +020053 },
54 "alter": {
AviZi280f8012017-06-09 02:39:56 +030055 },
56 "actions": {
57 "truncate_configuration": "truncate configuration"
Michael Landof5f13c42017-02-19 12:35:04 +020058 }
59}