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)))", |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 8 | "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 Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 9 | "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 Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 19 | "name_index": "CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name)", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 20 | "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)", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 21 | "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))", |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 22 | "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)", |
ayalaben | 8dfa832 | 2018-04-10 13:43:01 +0300 | [diff] [blame] | 25 | "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))", |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 26 | "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 Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 30 | }, |
| 31 | "drop": { |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 32 | "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted", |
| 33 | "unique_value": "DROP TABLE IF EXISTS unique_value", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 34 | "package_details": "DROP TABLE IF EXISTS package_details", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 35 | "application_config" : "DROP TABLE IF EXISTS application_config", |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 36 | "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", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 46 | "action_artifact":"DROP TABLE IF EXISTS action_artifact", |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 47 | "activity_log": "DROP TABLE IF EXISTS activity_log", |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 48 | "migration": "DROP TABLE IF EXISTS migration", |
| 49 | "item_permissions": "DROP TABLE IF EXISTS item_permissions", |
ayalaben | 8dfa832 | 2018-04-10 13:43:01 +0300 | [diff] [blame] | 50 | "user_permission_items" : "DROP TABLE IF EXISTS user_permission_items", |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 51 | "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 Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 55 | }, |
| 56 | "alter": { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 57 | }, |
| 58 | "actions": { |
| 59 | "truncate_configuration": "truncate configuration" |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 60 | } |
| 61 | } |