Migration script sets InfluxDB Version to -1

I ran the migration script and it worked fine, but it set all the influxdb version to -1.

I looked at the code and found: chirpstack-v3-to-v4/main.go at baa0e65aef491fc706a3fd2fff4b1be2450e7339 · chirpstack/chirpstack-v3-to-v4 · GitHub

		out["InfluxDb"] = CSInfluxDBConfiguration{
			Endpoint:            as.Endpoint,
			Version:             as.Version - 1,
....

So I assume this is on purpose set to as.Version-1 is this correct? If so it might be helpful to mention this is the Readme or documentation. I had to change the InfluxDB Version to the Version I am using to get the integration to work again.

brave_iX1MrJEpTq

I believe this was done because in v3, the version is stored as 1 = InfluxDB v1, 2 = InfluxDB v2. In ChirpStack v4, the numbering starts with 0 (0 = InfluxDB v1, 1 = InfluxDB v2).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.