Added Indexes
This commit is contained in:
parent
b698dc9d7a
commit
66b365cc54
|
@ -0,0 +1,8 @@
|
|||
-- CreateIndex
|
||||
CREATE INDEX "AccessPoint_id_idx" ON "AccessPoint"("id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "PAHost_id_idx" ON "PAHost"("id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "WifiDevice_id_mac_idx" ON "WifiDevice"("id", "mac");
|
|
@ -106,6 +106,8 @@ model WifiDevice {
|
|||
accessPoint AccessPoint? @relation("wifidevice_to_ap", fields: [accessPointId], references: [id])
|
||||
owner User? @relation("wifidevice_to_owner", fields: [ownerId], references: [id])
|
||||
user User? @relation("wifidevice_to_user", fields: [userId], references: [id])
|
||||
|
||||
@@index([id, mac])
|
||||
}
|
||||
|
||||
model Log {
|
||||
|
@ -130,6 +132,8 @@ model PAHost {
|
|||
updatedAt DateTime @updatedAt
|
||||
ownerId Int
|
||||
owner User @relation("pahost_to_user", fields: [ownerId], references: [id])
|
||||
|
||||
@@index([id])
|
||||
}
|
||||
|
||||
model AccessPoint {
|
||||
|
@ -156,6 +160,8 @@ model AccessPoint {
|
|||
|
||||
network Network? @relation(fields: [networkId], references: [id])
|
||||
networkId Int?
|
||||
|
||||
@@index([id])
|
||||
}
|
||||
|
||||
model AccessPointStats {
|
||||
|
|
Loading…
Reference in New Issue
Block a user