summaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/build/scripts/cassandra-commands.json
blob: 0b0519a3df7d875563453d0ac88efa6ee5ee97bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  "create": {
    "version": "CREATE TYPE IF NOT EXISTS version (major int, minor int)",
    "user_candidate_version": "CREATE TYPE IF NOT EXISTS user_candidate_version (version frozen<version>, user text)",
    "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))",
    "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))",
    "unique_value" : "CREATE TABLE IF NOT EXISTS unique_value (type text, value text, PRIMARY KEY ((type, value)))",
    "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)))",
    "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))",
    "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))",
    "application_config" : "CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key))",
    "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)))",
    "supportedComponents_index" : "CREATE INDEX IF NOT EXISTS action_supportedComponents ON dox.Action (supportedComponents)",
    "category_list_index" : "CREATE INDEX IF NOT EXISTS action_category_list ON dox.Action (category_list)",
    "supportedModels_index" : "CREATE INDEX IF NOT EXISTS action_supportedModels ON dox.Action (supportedModels)",
    "vendor_list_index" : "CREATE INDEX IF NOT EXISTS action_vendor_list ON dox.Action (vendor_list)",
    "actionUUID_index" : "CREATE INDEX IF NOT EXISTS action_actionUUID ON dox.Action (actionUUID)",
    "ecomp_component": "CREATE TABLE IF NOT EXISTS dox.ecompcomponent(id text PRIMARY KEY, name text)",
    "name_index": "CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name)",
    "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)",
    "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))",
    "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))",
    "migration": "CREATE TABLE IF NOT EXISTS migration (id text, ismigrated boolean, primary key (id))",
    "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)",
    "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))",
    "notification_subscribers": "CREATE TABLE IF NOT EXISTS NOTIFICATION_SUBSCRIBERS (entity_id text PRIMARY KEY, subscribers set<text>)",
    "last_notification": "CREATE TABLE IF NOT EXISTS last_notification (owner_id text PRIMARY KEY, event_id timeuuid)",
    "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)",
    "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)))"
  },
  "drop": {
    "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted",
    "unique_value": "DROP TABLE IF EXISTS unique_value",
    "package_details": "DROP TABLE IF EXISTS package_details",
    "application_config" : "DROP TABLE IF EXISTS application_config",
    "vsp_enriched_service_artifact" :"DROP TABLE IF EXISTS vsp_enriched_service_artifact",
    "vsp_enriched_service_template" :"DROP TABLE IF EXISTS vsp_enriched_service_template",
    "action" : "DROP TABLE IF EXISTS action",
    "supportedComponents_index" : "DROP INDEX IF EXISTS dox.action_supportedComponents",
    "category_list_index" : "DROP INDEX IF EXISTS dox.action_category_list",
    "supportedModels_index" : "DROP INDEX IF EXISTS dox.action_supportedModels",
    "vendor_list_index" : "DROP INDEX IF EXISTS dox.action_vendor_list",
    "actionUUID_index" : "DROP INDEX IF EXISTS dox.action_actionUUID",
    "name_index" : "DROP INDEX IF EXISTS dox.action_name",
    "ecomp_component": "DROP TABLE IF EXISTS dox.ecompcomponent",
    "action_artifact":"DROP TABLE IF EXISTS action_artifact",
    "activity_log": "DROP TABLE IF EXISTS activity_log",
    "migration": "DROP TABLE IF EXISTS migration",
    "item_permissions": "DROP TABLE IF EXISTS item_permissions",
    "user_permission_items" : "DROP TABLE IF EXISTS user_permission_items",
    "notification_subscribers": "DROP TABLE IF EXISTS notification_subscribers",
    "last_notification": "DROP TABLE IF EXISTS last_notification",
    "notifications": "DROP TABLE IF EXISTS notifications",
    "vsp_merge_hint": "DROP TABLE IF EXISTS vsp_merge_hint"
  },
  "alter": {
  },
  "actions": {
    "truncate_configuration": "truncate configuration"
  }
}