Merge pull request #8245 from YevhenBondarenko/fix/upgrade

[3.5]fixed upgrade schema update
This commit is contained in:
Andrew Shvayka 2023-03-23 10:34:37 +02:00 committed by GitHub
commit bcd9ea3931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -72,8 +72,6 @@ WHERE cleared = FALSE
ORDER BY l.created_time DESC, l.id ORDER BY l.created_time DESC, l.id
LIMIT 1); LIMIT 1);
VACUUM FULL ANALYZE alarm;
-- ALARM STATUS REFACTORING END -- ALARM STATUS REFACTORING END
-- ALARM COMMENTS START -- ALARM COMMENTS START

View File

@ -684,6 +684,11 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService
schemaUpdateFile = Paths.get(installScripts.getDataDir(), "upgrade", "3.4.4", SCHEMA_UPDATE_SQL); schemaUpdateFile = Paths.get(installScripts.getDataDir(), "upgrade", "3.4.4", SCHEMA_UPDATE_SQL);
loadSql(schemaUpdateFile, conn); loadSql(schemaUpdateFile, conn);
try {
conn.createStatement().execute("VACUUM FULL ANALYZE alarm;"); //NOSONAR, ignoring because method used to execute thingsboard database upgrade script
} catch (Exception e) {
}
try { try {
conn.createStatement().execute("ALTER TABLE asset_profile ADD COLUMN default_edge_rule_chain_id uuid"); //NOSONAR, ignoring because method used to execute thingsboard database upgrade script conn.createStatement().execute("ALTER TABLE asset_profile ADD COLUMN default_edge_rule_chain_id uuid"); //NOSONAR, ignoring because method used to execute thingsboard database upgrade script
} catch (Exception e) { } catch (Exception e) {