Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiLandiak committed Jul 8, 2024
2 parents e1eb583 + 8aea90b commit 0756f0e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions application/src/main/data/upgrade/3.7.0/schema_update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--
-- Copyright © 2016-2024 The Thingsboard Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--

Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ public void performInstall() {
entityDatabaseSchemaService.createCustomerTitleUniqueConstraintIfNotExists();
systemDataLoaderService.updateDefaultNotificationConfigs(false);
systemDataLoaderService.updateSecuritySettings();
case "3.7.0":
log.info("Upgrading ThingsBoard from version 3.7.0 to 3.7.1 ...");
databaseEntitiesUpgradeService.upgradeDatabase("3.7.0");
//TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ public void upgradeDatabase(String fromVersion) throws Exception {
case "3.6.4":
updateSchema("3.6.4", 3006004, "3.7.0", 3007000, null);
break;
case "3.7.0":
updateSchema("3.7.0", 3007000, "3.7.1", 3007001, null);
break;
default:
throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion);
}
Expand Down Expand Up @@ -194,4 +197,5 @@ protected boolean isOldSchema(Connection conn, long fromVersion) {
}
return isOldSchema;
}

}

0 comments on commit 0756f0e

Please sign in to comment.