Browse Source
Merge pull request #10544 from thingsboard/3.6.4-upgrade
3.6.4 upgrade script
pull/10637/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
7 additions and
1 deletions
-
application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java
-
application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java
-
dao/src/main/resources/sql/schema-entities.sql
|
|
@ -127,6 +127,9 @@ public class ThingsboardInstallService { |
|
|
log.info("Upgrading ThingsBoard from version 3.6.2 to 3.6.3 ..."); |
|
|
log.info("Upgrading ThingsBoard from version 3.6.2 to 3.6.3 ..."); |
|
|
databaseEntitiesUpgradeService.upgradeDatabase("3.6.2"); |
|
|
databaseEntitiesUpgradeService.upgradeDatabase("3.6.2"); |
|
|
systemDataLoaderService.updateDefaultNotificationConfigs(); |
|
|
systemDataLoaderService.updateDefaultNotificationConfigs(); |
|
|
|
|
|
case "3.6.3": |
|
|
|
|
|
log.info("Upgrading ThingsBoard from version 3.6.3 to 3.6.4 ..."); |
|
|
|
|
|
databaseEntitiesUpgradeService.upgradeDatabase("3.6.3"); |
|
|
//TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
|
|
|
//TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
|
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
|
|
|
@ -115,6 +115,9 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService |
|
|
case "3.6.2": |
|
|
case "3.6.2": |
|
|
updateSchema("3.6.2", 3006002, "3.6.3", 3006003, null); |
|
|
updateSchema("3.6.2", 3006002, "3.6.3", 3006003, null); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case "3.6.3": |
|
|
|
|
|
updateSchema("3.6.3", 3006003, "3.6.4", 3006004, null); |
|
|
|
|
|
break; |
|
|
default: |
|
|
default: |
|
|
throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion); |
|
|
throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion); |
|
|
} |
|
|
} |
|
|
|
|
|
@ -25,7 +25,7 @@ CREATE OR REPLACE PROCEDURE insert_tb_schema_settings() |
|
|
$$ |
|
|
$$ |
|
|
BEGIN |
|
|
BEGIN |
|
|
IF (SELECT COUNT(*) FROM tb_schema_settings) = 0 THEN |
|
|
IF (SELECT COUNT(*) FROM tb_schema_settings) = 0 THEN |
|
|
INSERT INTO tb_schema_settings (schema_version) VALUES (3006000); |
|
|
INSERT INTO tb_schema_settings (schema_version) VALUES (3006004); |
|
|
END IF; |
|
|
END IF; |
|
|
END; |
|
|
END; |
|
|
$$; |
|
|
$$; |
|
|
|