Commit b52d2aae17c21f6018ef316998297d149b90ddd6

Authored by Volodymyr Babak
1 parent 230a3031

Get rid of configuration field

... ... @@ -59,7 +59,6 @@ CREATE TABLE IF NOT EXISTS thingsboard.edge (
59 59 secret text,
60 60 edge_license_key text,
61 61 cloud_endpoint text,
62   - configuration text,
63 62 additional_info text,
64 63 PRIMARY KEY (id, tenant_id, customer_id, type)
65 64 );
... ...
... ... @@ -19,7 +19,6 @@ CREATE TABLE IF NOT EXISTS edge (
19 19 additional_info varchar,
20 20 customer_id varchar(31),
21 21 root_rule_chain_id varchar(31),
22   - configuration varchar(10000000),
23 22 type varchar(255),
24 23 name varchar(255),
25 24 label varchar(255),
... ...
... ... @@ -969,7 +969,7 @@ public final class EdgeGrpcSession implements Closeable {
969 969 .setSecret(edge.getSecret())
970 970 .setEdgeLicenseKey(edge.getEdgeLicenseKey())
971 971 .setCloudEndpoint(edge.getCloudEndpoint())
972   - .setConfiguration(JacksonUtil.toString(edge.getConfiguration()))
  972 + .setAdditionalInfo(JacksonUtil.toString(edge.getAdditionalInfo()))
973 973 .setCloudType("CE");
974 974 if (edge.getCustomerId() != null) {
975 975 builder.setCustomerIdMSB(edge.getCustomerId().getId().getMostSignificantBits())
... ...
... ... @@ -47,7 +47,6 @@ public class Edge extends SearchTextBasedWithAdditionalInfo<EdgeId> implements H
47 47 private String secret;
48 48 private String edgeLicenseKey;
49 49 private String cloudEndpoint;
50   - private transient JsonNode configuration;
51 50
52 51 public Edge() {
53 52 super();
... ... @@ -68,7 +67,6 @@ public class Edge extends SearchTextBasedWithAdditionalInfo<EdgeId> implements H
68 67 this.secret = edge.getSecret();
69 68 this.edgeLicenseKey = edge.getEdgeLicenseKey();
70 69 this.cloudEndpoint = edge.getCloudEndpoint();
71   - this.configuration = edge.getConfiguration();
72 70 }
73 71
74 72 @Override
... ...
... ... @@ -87,7 +87,7 @@ message EdgeConfiguration {
87 87 string secret = 10;
88 88 string edgeLicenseKey = 11;
89 89 string cloudEndpoint = 12;
90   - string configuration = 13;
  90 + string additionalInfo = 13;
91 91 string cloudType = 14;
92 92 }
93 93
... ...
... ... @@ -366,7 +366,6 @@ public class ModelConstants {
366 366 public static final String EDGE_NAME_PROPERTY = "name";
367 367 public static final String EDGE_LABEL_PROPERTY = "label";
368 368 public static final String EDGE_TYPE_PROPERTY = "type";
369   - public static final String EDGE_CONFIGURATION_PROPERTY = "configuration";
370 369 public static final String EDGE_ADDITIONAL_INFO_PROPERTY = ADDITIONAL_INFO_PROPERTY;
371 370 public static final String EDGE_BY_TENANT_AND_SEARCH_TEXT_COLUMN_FAMILY_NAME = "edge_by_tenant_and_search_text";
372 371 public static final String EDGE_BY_TENANT_BY_TYPE_AND_SEARCH_TEXT_COLUMN_FAMILY_NAME = "edge_by_tenant_by_type_and_search_text";
... ...
... ... @@ -34,7 +34,6 @@ import java.util.UUID;
34 34 import static org.thingsboard.server.dao.model.ModelConstants.EDGE_ADDITIONAL_INFO_PROPERTY;
35 35 import static org.thingsboard.server.dao.model.ModelConstants.EDGE_CLOUD_ENDPOINT_KEY_PROPERTY;
36 36 import static org.thingsboard.server.dao.model.ModelConstants.EDGE_COLUMN_FAMILY_NAME;
37   -import static org.thingsboard.server.dao.model.ModelConstants.EDGE_CONFIGURATION_PROPERTY;
38 37 import static org.thingsboard.server.dao.model.ModelConstants.EDGE_CUSTOMER_ID_PROPERTY;
39 38 import static org.thingsboard.server.dao.model.ModelConstants.EDGE_LABEL_PROPERTY;
40 39 import static org.thingsboard.server.dao.model.ModelConstants.EDGE_LICENSE_KEY_PROPERTY;
... ... @@ -91,9 +90,6 @@ public class EdgeEntity implements SearchTextEntity<Edge> {
91 90 @Column(name = EDGE_SECRET_PROPERTY)
92 91 private String secret;
93 92
94   - @Column(name = EDGE_CONFIGURATION_PROPERTY, codec = JsonCodec.class)
95   - private JsonNode configuration;
96   -
97 93 @Column(name = EDGE_ADDITIONAL_INFO_PROPERTY, codec = JsonCodec.class)
98 94 private JsonNode additionalInfo;
99 95
... ... @@ -131,7 +127,6 @@ public class EdgeEntity implements SearchTextEntity<Edge> {
131 127 this.secret = edge.getSecret();
132 128 this.edgeLicenseKey = edge.getEdgeLicenseKey();
133 129 this.cloudEndpoint = edge.getCloudEndpoint();
134   - this.configuration = edge.getConfiguration();
135 130 this.additionalInfo = edge.getAdditionalInfo();
136 131 }
137 132
... ... @@ -160,7 +155,6 @@ public class EdgeEntity implements SearchTextEntity<Edge> {
160 155 edge.setSecret(secret);
161 156 edge.setEdgeLicenseKey(edgeLicenseKey);
162 157 edge.setCloudEndpoint(cloudEndpoint);
163   - edge.setConfiguration(configuration);
164 158 edge.setAdditionalInfo(additionalInfo);
165 159 return edge;
166 160 }
... ...
... ... @@ -90,10 +90,6 @@ public class EdgeEntity extends BaseSqlEntity<Edge> implements SearchTextEntity<
90 90 private String cloudEndpoint;
91 91
92 92 @Type(type = "json")
93   - @Column(name = ModelConstants.EDGE_CONFIGURATION_PROPERTY)
94   - private JsonNode configuration;
95   -
96   - @Type(type = "json")
97 93 @Column(name = ModelConstants.EDGE_ADDITIONAL_INFO_PROPERTY)
98 94 private JsonNode additionalInfo;
99 95
... ... @@ -121,7 +117,6 @@ public class EdgeEntity extends BaseSqlEntity<Edge> implements SearchTextEntity<
121 117 this.secret = edge.getSecret();
122 118 this.edgeLicenseKey = edge.getEdgeLicenseKey();
123 119 this.cloudEndpoint = edge.getCloudEndpoint();
124   - this.configuration = edge.getConfiguration();
125 120 this.additionalInfo = edge.getAdditionalInfo();
126 121 }
127 122
... ... @@ -159,7 +154,6 @@ public class EdgeEntity extends BaseSqlEntity<Edge> implements SearchTextEntity<
159 154 edge.setSecret(secret);
160 155 edge.setEdgeLicenseKey(edgeLicenseKey);
161 156 edge.setCloudEndpoint(cloudEndpoint);
162   - edge.setConfiguration(configuration);
163 157 edge.setAdditionalInfo(additionalInfo);
164 158 return edge;
165 159 }
... ...
... ... @@ -739,7 +739,6 @@ CREATE TABLE IF NOT EXISTS thingsboard.edge (
739 739 secret text,
740 740 edge_license_key text,
741 741 cloud_endpoint text,
742   - configuration text,
743 742 additional_info text,
744 743 PRIMARY KEY (id, tenant_id, customer_id, type)
745 744 );
... ...
... ... @@ -259,7 +259,6 @@ CREATE TABLE IF NOT EXISTS edge (
259 259 additional_info varchar,
260 260 customer_id varchar(31),
261 261 root_rule_chain_id varchar(31),
262   - configuration varchar(10000000),
263 262 type varchar(255),
264 263 name varchar(255),
265 264 label varchar(255),
... ...
... ... @@ -259,7 +259,6 @@ CREATE TABLE IF NOT EXISTS edge (
259 259 additional_info varchar,
260 260 customer_id varchar(31),
261 261 root_rule_chain_id varchar(31),
262   - configuration varchar(10000000),
263 262 type varchar(255),
264 263 name varchar(255),
265 264 label varchar(255),
... ...