Fix: move enrichment nodes upgrade script to 3.5.1 version

This commit is contained in:
Dmytro Skarzhynets 2023-05-03 13:14:43 +03:00
parent bc18c81087
commit c607589655
2 changed files with 8 additions and 7 deletions

View File

@ -247,17 +247,18 @@ public class ThingsboardInstallService {
case "3.4.4": case "3.4.4":
log.info("Upgrading ThingsBoard from version 3.4.4 to 3.5.0 ..."); log.info("Upgrading ThingsBoard from version 3.4.4 to 3.5.0 ...");
databaseEntitiesUpgradeService.upgradeDatabase("3.4.4"); databaseEntitiesUpgradeService.upgradeDatabase("3.4.4");
dataUpdateService.updateData("3.4.4");
log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets();
if (!getEnv("SKIP_DEFAULT_NOTIFICATION_CONFIGS_CREATION", false)) { if (!getEnv("SKIP_DEFAULT_NOTIFICATION_CONFIGS_CREATION", false)) {
systemDataLoaderService.createDefaultNotificationConfigs(); systemDataLoaderService.createDefaultNotificationConfigs();
} else { } else {
log.info("Skipping default notification configs creation"); log.info("Skipping default notification configs creation");
} }
installScripts.loadSystemLwm2mResources(); installScripts.loadSystemLwm2mResources();
break; case "3.5.0":
//TODO update CacheCleanupService on the next version upgrade log.info("Upgrading ThingsBoard from version 3.5.0 to 3.5.1 ...");
log.info("Updating system data...");
dataUpdateService.updateData("3.5.0");
systemDataLoaderService.updateSystemWidgets();
//TODO update CacheCleanupService on the next version upgrade
default: default:
throw new RuntimeException("Unable to upgrade ThingsBoard, unsupported fromVersion: " + upgradeFromVersion); throw new RuntimeException("Unable to upgrade ThingsBoard, unsupported fromVersion: " + upgradeFromVersion);

View File

@ -206,8 +206,8 @@ public class DefaultDataUpdateService implements DataUpdateService {
log.info("Skipping edge events migration"); log.info("Skipping edge events migration");
} }
break; break;
case "3.4.4": case "3.5.0":
log.info("Updating data from version 3.4.4 to 3.5.0 ..."); log.info("Updating data from version 3.5.0 to 3.5.1 ...");
log.info("Starting enrichment rule nodes update ..."); log.info("Starting enrichment rule nodes update ...");
updateEnrichmentRuleNodes(); updateEnrichmentRuleNodes();
log.info("Finished enrichment rule nodes update!"); log.info("Finished enrichment rule nodes update!");