Commit 0eff2acd5c3dbf5c407bebd89b2f6eeaf4170938
1 parent
7c381995
Fix for entity view keys sql field
Showing
4 changed files
with
2 additions
and
31 deletions
application/src/main/data/upgrade/2.2.1/schema_update.sql
deleted
100644 → 0
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); |
@@ -101,17 +101,11 @@ public class ThingsboardInstallService { | @@ -101,17 +101,11 @@ public class ThingsboardInstallService { | ||
101 | log.info("Upgrading ThingsBoard from version 2.1.1 to 2.1.2 ..."); | 101 | log.info("Upgrading ThingsBoard from version 2.1.1 to 2.1.2 ..."); |
102 | 102 | ||
103 | databaseUpgradeService.upgradeDatabase("2.1.1"); | 103 | databaseUpgradeService.upgradeDatabase("2.1.1"); |
104 | - | ||
105 | case "2.1.3": | 104 | case "2.1.3": |
106 | log.info("Upgrading ThingsBoard from version 2.1.3 to 2.2.0 ..."); | 105 | log.info("Upgrading ThingsBoard from version 2.1.3 to 2.2.0 ..."); |
107 | 106 | ||
108 | databaseUpgradeService.upgradeDatabase("2.1.3"); | 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 | log.info("Updating system data..."); | 109 | log.info("Updating system data..."); |
116 | 110 | ||
117 | systemDataLoaderService.deleteSystemWidgetBundle("charts"); | 111 | systemDataLoaderService.deleteSystemWidgetBundle("charts"); |
@@ -157,14 +157,6 @@ public class SqlDatabaseUpgradeService implements DatabaseUpgradeService { | @@ -157,14 +157,6 @@ public class SqlDatabaseUpgradeService implements DatabaseUpgradeService { | ||
157 | log.info("Schema updated."); | 157 | log.info("Schema updated."); |
158 | } | 158 | } |
159 | break; | 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 | default: | 160 | default: |
169 | throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion); | 161 | throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion); |
170 | } | 162 | } |