V3_v4 migration issue. Which table holds the "is_encrypted" column?

Hi

Progressing in the v3-> v4 migaryion and facing a new issue in the scripts being:

2023/12/18 17:49:28 Migrating device-queue
2023/12/18 17:49:28 Execute device-queue-item statement errorpq: null value in column “is_encrypted” violates not-null constraint

I explored all tables from loraserver_as and loraserver_ns but did n,ot find any column named “is_encrypted”

Where should I look for that column ?

Thank you

I found a ‘is_encrypted’ column in the v4 ‘chirpstack’ database but nothing in the database from the v3 … From which field from the v3 database the scripts tries to populate the *‘is_encrypted’ column in v4 ?

And I just saw this recent commit which may help. I have to give it a try Add missing is_encrypted field. · chirpstack/chirpstack-v3-to-v4@87e858f · GitHub

So I confirm that v4.0.8 of the migration scripts solves the issue:

LoRaServer:/tmp# ./chirpstack-v3-to-v4 --as-config-file /etc/chirpstack-application-server/chirpstack-application-server.toml --ns-config-file /etc/chirpstack-network-server/chirpstack-network-server.toml --cs-config-file /etc/chirpstack/chirpstack.toml --drop-tenants-and-users
2023/12/19 07:18:12 Reading ChirpStack configuration file: /etc/chirpstack/chirpstack.toml
2023/12/19 07:18:12 Reading AS configuration file: /etc/chirpstack-application-server/chirpstack-application-server.toml
2023/12/19 07:18:12 Start migration
2023/12/19 07:18:12 Deleting users and tenants from target database
2023/12/19 07:18:12 Migrating users
2023/12/19 07:18:12 Migrating organizations
2023/12/19 07:18:12 Migrating organization users
2023/12/19 07:18:12 Migrating applications
2023/12/19 07:18:12 Migrating application integrations
2023/12/19 07:18:12 Reading NS configuration file: /etc/chirpstack-network-server/chirpstack-network-server.toml
2023/12/19 07:18:12 Migrating region: EU_863_870
2023/12/19 07:18:12 Migrating gateways
2023/12/19 07:18:12 Migrating gateway metrics
2023/12/19 07:18:13 Migrating device-profiles
2023/12/19 07:18:13 Migrating devices
2023/12/19 07:18:13 Migrating device-keys
2023/12/19 07:18:13 Migrating device-queue
2023/12/19 07:18:13 Migrating device metrics
2023/12/19 07:18:13 Migrating device-sessions
2023/12/19 07:18:13 Migrate device <> gateway
2023/12/19 07:18:14 Migrating multicast-groups
2023/12/19 07:18:14 Migrating multicast-group devices
2023/12/19 07:18:14 Migrating multicast-group queue
2023/12/19 07:18:14 Done :slight_smile:

Thank you @brocaar

2 Likes