Skip to content

Commit

Permalink
Update migration tool to ChirpStack v4.2.0 database schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
brocaar committed Jan 24, 2023
1 parent 4ebfc8d commit f478b97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ will drop all tenants and users from the ChirpStack v4 database.

## Notes

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

## Building from source
Expand Down
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ function encodeDownlink(input) {
supports_class_b,
supports_class_c,
class_b_timeout,
class_b_ping_slot_period,
class_b_ping_slot_nb_k,
class_b_ping_slot_dr,
class_b_ping_slot_freq,
class_c_timeout,
Expand All @@ -1001,8 +1001,9 @@ function encodeDownlink(input) {
device_status_req_interval,
flush_queue_on_activate,
measurements,
auto_detect_measurements
) 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)`,
auto_detect_measurements,
region_config_id
) 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)`,
nsDP.ID,
intToUUID(asDP.OrganizationID),
asDP.CreatedAt,
Expand Down Expand Up @@ -1033,6 +1034,7 @@ function encodeDownlink(input) {
true,
"{}",
true,
nil,
)
if err != nil {
panic(err)
Expand Down

0 comments on commit f478b97

Please sign in to comment.