Browse Source
Merge pull request #9294 from dashevchenko/db_scheme_version_update
Updated db schema version from 3.5.2 to 3.6.0
pull/9331/head
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java
-
dao/src/main/resources/sql/schema-entities.sql
|
|
|
@ -768,10 +768,10 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService |
|
|
|
} catch (Exception e) { |
|
|
|
} |
|
|
|
|
|
|
|
conn.createStatement().execute("UPDATE tb_schema_settings SET schema_version = 3005002;"); |
|
|
|
log.info("Schema updated to version 3.5.2."); |
|
|
|
conn.createStatement().execute("UPDATE tb_schema_settings SET schema_version = 3006000;"); |
|
|
|
log.info("Schema updated to version 3.6.0."); |
|
|
|
} else { |
|
|
|
log.info("Skip schema re-update to version 3.5.2. Use env flag 'SKIP_SCHEMA_VERSION_CHECK' to force the re-update."); |
|
|
|
log.info("Skip schema re-update to version 3.6.0. Use env flag 'SKIP_SCHEMA_VERSION_CHECK' to force the re-update."); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Failed updating schema!!!", e); |
|
|
|
|
|
|
|
@ -25,7 +25,7 @@ CREATE OR REPLACE PROCEDURE insert_tb_schema_settings() |
|
|
|
$$ |
|
|
|
BEGIN |
|
|
|
IF (SELECT COUNT(*) FROM tb_schema_settings) = 0 THEN |
|
|
|
INSERT INTO tb_schema_settings (schema_version) VALUES (3005002); |
|
|
|
INSERT INTO tb_schema_settings (schema_version) VALUES (3006000); |
|
|
|
END IF; |
|
|
|
END; |
|
|
|
$$; |
|
|
|
|