|
|
|
@ -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 * |
|
|
|
|