collect map reports
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE `map_reports` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`node_id` BIGINT NOT NULL,
|
||||
`long_name` VARCHAR(191) NOT NULL,
|
||||
`short_name` VARCHAR(191) NOT NULL,
|
||||
`role` INTEGER NOT NULL,
|
||||
`hardware_model` INTEGER NOT NULL,
|
||||
`firmware_version` VARCHAR(191) NOT NULL,
|
||||
`region` INTEGER NULL,
|
||||
`modem_preset` INTEGER NULL,
|
||||
`has_default_channel` BOOLEAN NULL,
|
||||
`latitude` INTEGER NULL,
|
||||
`longitude` INTEGER NULL,
|
||||
`altitude` INTEGER NULL,
|
||||
`position_precision` INTEGER NULL,
|
||||
`num_online_local_nodes` INTEGER NULL,
|
||||
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
`updated_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
|
||||
INDEX `map_reports_created_at_idx`(`created_at`),
|
||||
INDEX `map_reports_updated_at_idx`(`updated_at`),
|
||||
INDEX `map_reports_node_id_idx`(`node_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
@ -39,6 +39,33 @@ model Node {
|
||||
@@map("nodes")
|
||||
}
|
||||
|
||||
model MapReport {
|
||||
id BigInt @id @default(autoincrement())
|
||||
node_id BigInt
|
||||
long_name String
|
||||
short_name String
|
||||
role Int
|
||||
hardware_model Int
|
||||
firmware_version String
|
||||
|
||||
region Int?
|
||||
modem_preset Int?
|
||||
has_default_channel Boolean?
|
||||
latitude Int?
|
||||
longitude Int?
|
||||
altitude Int?
|
||||
position_precision Int?
|
||||
num_online_local_nodes Int?
|
||||
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
|
||||
@@index(created_at)
|
||||
@@index(updated_at)
|
||||
@@index(node_id)
|
||||
@@map("map_reports")
|
||||
}
|
||||
|
||||
model NeighbourInfo {
|
||||
id BigInt @id @default(autoincrement())
|
||||
node_id BigInt
|
||||
|
Reference in New Issue
Block a user