Skip to content

Commit

Permalink
Set version to 1.3.1-SNAPSHOT. Update migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-landiak committed Apr 3, 2024
1 parent 1b189a0 commit 29613e3
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>mqtt-broker</artifactId>
</parent>
<artifactId>application</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public void performInstall() {

systemDataLoaderService.createWebSocketMqttClientCredentials();
systemDataLoaderService.createDefaultWebSocketConnections();
case "1.3.0":
log.info("Upgrading TBMQ from version 1.3.0 to 1.3.1 ...");
databaseEntitiesUpgradeService.upgradeDatabase("1.3.0");
break;
default:
throw new RuntimeException("Unable to upgrade TBMQ, unsupported fromVersion: " + upgradeFromVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ public void upgradeDatabase(String fromVersion) throws Exception {
log.info("Schema updated.");
}
break;
case "1.3.0":
try (Connection conn = DriverManager.getConnection(dbUrl, dbUserName, dbPassword)) {
log.info("Updating schema ...");
if (isOldSchema(conn, 1003000)) {
try {
conn.createStatement().execute("UPDATE tb_schema_settings SET schema_version = 1003001;");
} catch (Exception ignored) {
}
}
log.info("Schema updated.");
}
break;
default:
throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion);
}
Expand Down
2 changes: 1 addition & 1 deletion common/actor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>common</artifactId>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion common/cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>common</artifactId>
</parent>
<groupId>org.thingsboard.mqtt-broker.common</groupId>
Expand Down
2 changes: 1 addition & 1 deletion common/dao-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>common</artifactId>
</parent>
<groupId>org.thingsboard.mqtt-broker.common</groupId>
Expand Down
2 changes: 1 addition & 1 deletion common/data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>common</artifactId>
</parent>
<groupId>org.thingsboard.mqtt-broker.common</groupId>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>mqtt-broker</artifactId>
</parent>
<artifactId>common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion common/queue/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>common</artifactId>
</parent>
<groupId>org.thingsboard.mqtt-broker.common</groupId>
Expand Down
2 changes: 1 addition & 1 deletion common/stats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>common</artifactId>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion common/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>common</artifactId>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>mqtt-broker</artifactId>
</parent>
<artifactId>dao</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion dao/src/main/resources/sql/schema-entities.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BEGIN
IF (SELECT COUNT(*) FROM tb_schema_settings) = 0 THEN
INSERT
INTO tb_schema_settings (schema_version)
VALUES (1003000);
VALUES (1003001);
END IF;
END;
$$;
Expand Down
2 changes: 1 addition & 1 deletion msa/black-box-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>msa</artifactId>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion msa/mqtt-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>msa</artifactId>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion msa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>mqtt-broker</artifactId>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions msa/tbmq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>msa</artifactId>
</parent>
<groupId>org.thingsboard.mqtt-broker.msa</groupId>
Expand All @@ -37,7 +37,7 @@
<pkg.name>thingsboard-mqtt-broker</pkg.name>
<tbmq.docker.name>tbmq</tbmq.docker.name>
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
<pkg.upgradeVersion>1.3.0</pkg.upgradeVersion>
<pkg.upgradeVersion>1.3.1</pkg.upgradeVersion>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.thingsboard.mqtt-broker</groupId>
<artifactId>mqtt-broker</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>TBMQ</name>
Expand Down
2 changes: 1 addition & 1 deletion ui-ngx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tbmq",
"version": "1.3.0",
"version": "1.3.1",
"scripts": {
"ng": "ng",
"start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --configuration development --host 0.0.0.0 --open",
Expand Down
2 changes: 1 addition & 1 deletion ui-ngx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard.mqtt-broker</groupId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<artifactId>mqtt-broker</artifactId>
</parent>
<artifactId>ui-ngx</artifactId>
Expand Down

0 comments on commit 29613e3

Please sign in to comment.