Was modified classes to config and create DB for EntityView model
This commit is contained in:
parent
1f60a19dac
commit
8fdfa909db
@ -88,6 +88,13 @@ public class ThingsboardInstallService {
|
|||||||
|
|
||||||
dataUpdateService.updateData("1.4.0");
|
dataUpdateService.updateData("1.4.0");
|
||||||
|
|
||||||
|
case "2.0.0":
|
||||||
|
log.info("Upgrading ThingsBoard from version 2.0.0 to 2.1.1 ...");
|
||||||
|
|
||||||
|
databaseUpgradeService.upgradeDatabase("2.0.0");
|
||||||
|
|
||||||
|
dataUpdateService.updateData("2.0.0");
|
||||||
|
|
||||||
log.info("Updating system data...");
|
log.info("Updating system data...");
|
||||||
|
|
||||||
systemDataLoaderService.deleteSystemWidgetBundle("charts");
|
systemDataLoaderService.deleteSystemWidgetBundle("charts");
|
||||||
|
|||||||
@ -49,6 +49,10 @@ public class DefaultDataUpdateService implements DataUpdateService {
|
|||||||
log.info("Updating data from version 1.4.0 to 2.0.0 ...");
|
log.info("Updating data from version 1.4.0 to 2.0.0 ...");
|
||||||
tenantsDefaultRuleChainUpdater.updateEntities(null);
|
tenantsDefaultRuleChainUpdater.updateEntities(null);
|
||||||
break;
|
break;
|
||||||
|
case "2.0.0":
|
||||||
|
log.info("Updating data from version 2.0.0 to 2.1.1 ...");
|
||||||
|
tenantsDefaultRuleChainUpdater.updateEntities(null);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException("Unable to update data, unsupported fromVersion: " + fromVersion);
|
throw new RuntimeException("Unable to update data, unsupported fromVersion: " + fromVersion);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,6 +107,15 @@ public class SqlDatabaseUpgradeService implements DatabaseUpgradeService {
|
|||||||
log.info("Schema updated.");
|
log.info("Schema updated.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "2.0.0":
|
||||||
|
try (Connection conn = DriverManager.getConnection(dbUrl, dbUserName, dbPassword)) {
|
||||||
|
log.info("Updating schema ...");
|
||||||
|
schemaUpdateFile = Paths.get(installScripts.getDataDir(), "upgrade", "2.1.1", SCHEMA_UPDATE_SQL);
|
||||||
|
loadSql(schemaUpdateFile, conn);
|
||||||
|
log.info("Schema updated.");
|
||||||
|
}
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user