Commit 0eff2acd5c3dbf5c407bebd89b2f6eeaf4170938

Authored by Volodymyr Babak
1 parent 7c381995

Fix for entity view keys sql field

... ... @@ -15,3 +15,5 @@
15 15 --
16 16
17 17 ALTER TABLE component_descriptor ADD UNIQUE (clazz);
  18 +
  19 +ALTER TABLE entity_view ALTER COLUMN keys SET DATA TYPE varchar(10000000);
... ...
1   ---
2   --- Copyright © 2016-2018 The Thingsboard Authors
3   ---
4   --- Licensed under the Apache License, Version 2.0 (the "License");
5   --- you may not use this file except in compliance with the License.
6   --- You may obtain a copy of the License at
7   ---
8   --- http://www.apache.org/licenses/LICENSE-2.0
9   ---
10   --- Unless required by applicable law or agreed to in writing, software
11   --- distributed under the License is distributed on an "AS IS" BASIS,
12   --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   --- See the License for the specific language governing permissions and
14   --- limitations under the License.
15   ---
16   -
17   -ALTER TABLE entity_view ALTER COLUMN keys SET DATA TYPE varchar(10000000);
\ No newline at end of file
... ... @@ -101,17 +101,11 @@ public class ThingsboardInstallService {
101 101 log.info("Upgrading ThingsBoard from version 2.1.1 to 2.1.2 ...");
102 102
103 103 databaseUpgradeService.upgradeDatabase("2.1.1");
104   -
105 104 case "2.1.3":
106 105 log.info("Upgrading ThingsBoard from version 2.1.3 to 2.2.0 ...");
107 106
108 107 databaseUpgradeService.upgradeDatabase("2.1.3");
109 108
110   - case "2.2.0":
111   - log.info("Upgrading ThingsBoard from version 2.2.0 to 2.2.1 ...");
112   -
113   - databaseUpgradeService.upgradeDatabase("2.2.0");
114   -
115 109 log.info("Updating system data...");
116 110
117 111 systemDataLoaderService.deleteSystemWidgetBundle("charts");
... ...
... ... @@ -157,14 +157,6 @@ public class SqlDatabaseUpgradeService implements DatabaseUpgradeService {
157 157 log.info("Schema updated.");
158 158 }
159 159 break;
160   - case "2.2.0":
161   - try (Connection conn = DriverManager.getConnection(dbUrl, dbUserName, dbPassword)) {
162   - log.info("Updating schema ...");
163   - schemaUpdateFile = Paths.get(installScripts.getDataDir(), "upgrade", "2.2.1", SCHEMA_UPDATE_SQL);
164   - loadSql(schemaUpdateFile, conn);
165   - log.info("Schema updated.");
166   - }
167   - break;
168 160 default:
169 161 throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion);
170 162 }
... ...