Collect portnums for ServiceEnvelopes

This commit is contained in:
Anton Roslund 2025-04-15 17:55:04 +02:00
parent 342c8dc87a
commit af2a663dab
3 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `service_envelopes` ADD COLUMN `portnum` INTEGER NULL;

View file

@ -204,6 +204,7 @@ model ServiceEnvelope {
gateway_id BigInt?
to BigInt
from BigInt
portnum Int?
protobuf Bytes
created_at DateTime @default(now())

View file

@ -750,6 +750,7 @@ client.on("message", async (topic, message) => {
gateway_id: envelope.gatewayId ? convertHexIdToNumericId(envelope.gatewayId) : null,
to: envelope.packet.to,
from: envelope.packet.from,
portnum: portnum,
protobuf: message,
},
});