Skip to content

Commit f478b97

Browse files
committed
Update migration tool to ChirpStack v4.2.0 database schema.
1 parent 4ebfc8d commit f478b97

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ will drop all tenants and users from the ChirpStack v4 database.
3232

3333
## Notes
3434

35+
* This utilty is compatible with the ChirpStack v4.2.0 or later database schema.
3536
* This utilty does not support [environment variables](https://www.chirpstack.io/docs/chirpstack/configuration.html#environment-variables) in configuration files, like ChirpStack does.
3637

3738
## Building from source

main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ function encodeDownlink(input) {
989989
supports_class_b,
990990
supports_class_c,
991991
class_b_timeout,
992-
class_b_ping_slot_period,
992+
class_b_ping_slot_nb_k,
993993
class_b_ping_slot_dr,
994994
class_b_ping_slot_freq,
995995
class_c_timeout,
@@ -1001,8 +1001,9 @@ function encodeDownlink(input) {
10011001
device_status_req_interval,
10021002
flush_queue_on_activate,
10031003
measurements,
1004-
auto_detect_measurements
1005-
) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30)`,
1004+
auto_detect_measurements,
1005+
region_config_id
1006+
) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31)`,
10061007
nsDP.ID,
10071008
intToUUID(asDP.OrganizationID),
10081009
asDP.CreatedAt,
@@ -1033,6 +1034,7 @@ function encodeDownlink(input) {
10331034
true,
10341035
"{}",
10351036
true,
1037+
nil,
10361038
)
10371039
if err != nil {
10381040
panic(err)

0 commit comments

Comments
 (0)