Browse Source

Simplify upgrage procedure

pull/8647/head
Andrii Shvaika 3 years ago
parent
commit
138c0e4f8f
  1. 13
      application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java

13
application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java

@ -256,17 +256,16 @@ public class ThingsboardInstallService {
}
case "3.5.0":
log.info("Upgrading ThingsBoard from version 3.5.0 to 3.5.1 ...");
entityDatabaseSchemaService.createOrUpdateViewsAndFunctions();
entityDatabaseSchemaService.createOrUpdateDeviceInfoView(persistToTelemetry);
log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets();
installScripts.loadSystemLwm2mResources();
//TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
break;
//TODO update CacheCleanupService on the next version upgrade
default:
throw new RuntimeException("Unable to upgrade ThingsBoard, unsupported fromVersion: " + upgradeFromVersion);
}
entityDatabaseSchemaService.createOrUpdateViewsAndFunctions();
entityDatabaseSchemaService.createOrUpdateDeviceInfoView(persistToTelemetry);
log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets();
installScripts.loadSystemLwm2mResources();
}
log.info("Upgrade finished successfully!");

Loading…
Cancel
Save