From c5827e1b9e0f08db4756ca28f40bde4180837f6b Mon Sep 17 00:00:00 2001 From: viktorbasanets Date: Thu, 6 Sep 2018 13:07:31 +0300 Subject: [PATCH] was added entity_type field to entity_views table --- application/src/main/data/upgrade/2.1.1/schema_update.cql | 3 ++- dao/src/main/resources/cassandra/schema.cql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/src/main/data/upgrade/2.1.1/schema_update.cql b/application/src/main/data/upgrade/2.1.1/schema_update.cql index d9ba517df7..1329a0b546 100644 --- a/application/src/main/data/upgrade/2.1.1/schema_update.cql +++ b/application/src/main/data/upgrade/2.1.1/schema_update.cql @@ -24,6 +24,7 @@ DROP TABLE IF EXISTS thingsboard.entity_views; CREATE TABLE IF NOT EXISTS thingsboard.entity_views ( id timeuuid, entity_id timeuuid, + entity_type text, tenant_id timeuuid, customer_id timeuuid, name text, @@ -33,7 +34,7 @@ CREATE TABLE IF NOT EXISTS thingsboard.entity_views ( search_text text, additional_info text, PRIMARY KEY (id, entity_id, tenant_id, customer_id) - ); +); CREATE MATERIALIZED VIEW IF NOT EXISTS thingsboard.entity_views_by_tenant_and_name AS SELECT * diff --git a/dao/src/main/resources/cassandra/schema.cql b/dao/src/main/resources/cassandra/schema.cql index bdd413d6ad..68f196f005 100644 --- a/dao/src/main/resources/cassandra/schema.cql +++ b/dao/src/main/resources/cassandra/schema.cql @@ -642,6 +642,7 @@ CREATE TABLE IF NOT EXISTS thingsboard.rule_node ( CREATE TABLE IF NOT EXISTS thingsboard.entity_views ( id timeuuid, entity_id timeuuid, + entity_type text, tenant_id timeuuid, customer_id timeuuid, name text,