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": case "3.5.0":
log.info("Upgrading ThingsBoard from version 3.5.0 to 3.5.1 ..."); log.info("Upgrading ThingsBoard from version 3.5.0 to 3.5.1 ...");
entityDatabaseSchemaService.createOrUpdateViewsAndFunctions(); //TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
entityDatabaseSchemaService.createOrUpdateDeviceInfoView(persistToTelemetry);
log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets();
installScripts.loadSystemLwm2mResources();
break; break;
//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);
} }
entityDatabaseSchemaService.createOrUpdateViewsAndFunctions();
entityDatabaseSchemaService.createOrUpdateDeviceInfoView(persistToTelemetry);
log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets();
installScripts.loadSystemLwm2mResources();
} }
log.info("Upgrade finished successfully!"); log.info("Upgrade finished successfully!");

Loading…
Cancel
Save