Collect packet_id for ServiceEnvelopes
This commit is contained in:
parent
f35a8876f9
commit
c8f322f012
3 changed files with 8 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `service_envelopes` ADD COLUMN `packet_id` BIGINT NULL;
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX `service_envelopes_packet_id_idx` ON `service_envelopes`(`packet_id`);
|
||||||
|
|
@ -205,6 +205,7 @@ model ServiceEnvelope {
|
||||||
to BigInt
|
to BigInt
|
||||||
from BigInt
|
from BigInt
|
||||||
portnum Int?
|
portnum Int?
|
||||||
|
packet_id BigInt?
|
||||||
protobuf Bytes
|
protobuf Bytes
|
||||||
|
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
|
|
@ -213,6 +214,7 @@ model ServiceEnvelope {
|
||||||
@@index(created_at)
|
@@index(created_at)
|
||||||
@@index(updated_at)
|
@@index(updated_at)
|
||||||
@@index(gateway_id)
|
@@index(gateway_id)
|
||||||
|
@@index(packet_id)
|
||||||
@@map("service_envelopes")
|
@@map("service_envelopes")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -751,6 +751,7 @@ client.on("message", async (topic, message) => {
|
||||||
to: envelope.packet.to,
|
to: envelope.packet.to,
|
||||||
from: envelope.packet.from,
|
from: envelope.packet.from,
|
||||||
portnum: portnum,
|
portnum: portnum,
|
||||||
|
packet_id: envelope.packet.id,
|
||||||
protobuf: message,
|
protobuf: message,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue