Showing
5 changed files
with
32 additions
and
3 deletions
1 | +-- | |
2 | +-- Copyright © 2016-2019 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 event ALTER COLUMN body SET DATA TYPE varchar(10000000); | ... | ... |
... | ... | @@ -106,8 +106,10 @@ public class ThingsboardInstallService { |
106 | 106 | |
107 | 107 | databaseUpgradeService.upgradeDatabase("2.1.3"); |
108 | 108 | |
109 | - case "2.2.0": | |
110 | - log.info("Upgrading ThingsBoard from version 2.2.0 to 2.3.0 ..."); | |
109 | + case "2.3.0": | |
110 | + log.info("Upgrading ThingsBoard from version 2.3.0 to 2.3.1 ..."); | |
111 | + | |
112 | + databaseUpgradeService.upgradeDatabase("2.3.0"); | |
111 | 113 | |
112 | 114 | log.info("Updating system data..."); |
113 | 115 | ... | ... |
... | ... | @@ -253,6 +253,8 @@ public class CassandraDatabaseUpgradeService implements DatabaseUpgradeService { |
253 | 253 | break; |
254 | 254 | case "2.1.3": |
255 | 255 | break; |
256 | + case "2.3.0": | |
257 | + break; | |
256 | 258 | default: |
257 | 259 | throw new RuntimeException("Unable to upgrade Cassandra database, unsupported fromVersion: " + fromVersion); |
258 | 260 | } | ... | ... |
... | ... | @@ -157,6 +157,14 @@ public class SqlDatabaseUpgradeService implements DatabaseUpgradeService { |
157 | 157 | log.info("Schema updated."); |
158 | 158 | } |
159 | 159 | break; |
160 | + case "2.3.0": | |
161 | + try (Connection conn = DriverManager.getConnection(dbUrl, dbUserName, dbPassword)) { | |
162 | + log.info("Updating schema ..."); | |
163 | + schemaUpdateFile = Paths.get(installScripts.getDataDir(), "upgrade", "2.3.1", SCHEMA_UPDATE_SQL); | |
164 | + loadSql(schemaUpdateFile, conn); | |
165 | + log.info("Schema updated."); | |
166 | + } | |
167 | + break; | |
160 | 168 | default: |
161 | 169 | throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion); |
162 | 170 | } | ... | ... |
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | <tb-cassandra.docker.name>tb-cassandra</tb-cassandra.docker.name> |
41 | 41 | <pkg.user>thingsboard</pkg.user> |
42 | 42 | <pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder> |
43 | - <pkg.upgradeVersion>2.2.0</pkg.upgradeVersion> | |
43 | + <pkg.upgradeVersion>2.3.0</pkg.upgradeVersion> | |
44 | 44 | </properties> |
45 | 45 | |
46 | 46 | <dependencies> | ... | ... |