Postgresql integration - gateway OS

Hey guys,

I’ve been struggling to setup postgresql integration with my application server to record device-related events. I’ve already set up one of my LoRa devices to be able to join and send data to the gateway successfully so naturally, I’d like to try and save this data for my own use.

I’ve been following the PostgreSQL integration page from:

  • making a new DB called “chirpstack_as_events”
  • new role called “chirpstack_as_events”
  • creating a new .toml application file with configfile
  • replaced both instances of dsn (one under [postgresql] and the other under [application_server.integration.postgresql]) with “postgres://chirpstack_as_events:dbpassword@localhost/chirpstack_as_events?sslmode=disable”
  • ensured to add postgresql into the array.
  • I found in addition to hstore, I had to add the extension pg_trgm manually as well.

I’m getting the following on version 3.17

setup integration error: new integration error: integration/postgresql: migrate up error: no migration found for version 60: read down for version 60 /migrations: file does not exist

when trying trying to change the configfile to use for my application server → sudo chirpstack-application-server --config chirpstack-application-server-new.toml.

Additionally, are the tables like “device_up”, “device_ack”, etc… supposed to be made automatically once this integration actually works? Or am I supposed to still make these tables manually?