Keep track of the names a node has been using
This commit is contained in:
parent
99e31d8692
commit
6210f04ea5
3 changed files with 59 additions and 0 deletions
|
|
@ -302,6 +302,26 @@ model Waypoint {
|
|||
@@map("waypoints")
|
||||
}
|
||||
|
||||
model NameHistory {
|
||||
id BigInt @id @default(autoincrement())
|
||||
node_id BigInt
|
||||
long_name String
|
||||
short_name String
|
||||
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
|
||||
@@index(node_id)
|
||||
@@index(long_name)
|
||||
|
||||
@@index(created_at)
|
||||
@@index(updated_at)
|
||||
@@map("name_history")
|
||||
|
||||
// We only want to keep track of unique name and node_id combinations
|
||||
@@unique([node_id, long_name, short_name])
|
||||
}
|
||||
|
||||
model BatteryStats {
|
||||
id BigInt @id @default(autoincrement())
|
||||
recorded_at DateTime? @default(now())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue