Merge pull request #10544 from thingsboard/3.6.4-upgrade

3.6.4 upgrade script
This commit is contained in:
Igor Kulikov 2024-04-11 16:08:07 +03:00 committed by GitHub
commit 651a9b2731
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -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:

View File

@ -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);
} }

View File

@ -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;
$$; $$;