collect traceroutes
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE `traceroutes` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`node_id` BIGINT NOT NULL,
|
||||
`route` JSON NOT NULL,
|
||||
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
`updated_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
|
||||
INDEX `traceroutes_created_at_idx`(`created_at`),
|
||||
INDEX `traceroutes_updated_at_idx`(`updated_at`),
|
||||
INDEX `traceroutes_node_id_idx`(`node_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
@ -52,3 +52,17 @@ model NeighbourInfo {
|
||||
@@index(updated_at)
|
||||
@@map("neighbour_infos")
|
||||
}
|
||||
|
||||
model TraceRoute {
|
||||
id BigInt @id @default(autoincrement())
|
||||
node_id BigInt
|
||||
route Json
|
||||
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
|
||||
@@index(created_at)
|
||||
@@index(updated_at)
|
||||
@@index(node_id)
|
||||
@@map("traceroutes")
|
||||
}
|
||||
|
Reference in New Issue
Block a user