Add relay view to faster load controller_uid
This commit is contained in:
parent
277b159200
commit
d4ff664f74
16 changed files with 146 additions and 81 deletions
8
migrations/20240611000000_add_relays_view.up.sql
Normal file
8
migrations/20240611000000_add_relays_view.up.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CREATE VIEW v_relays
|
||||
AS
|
||||
SELECT
|
||||
relays.*,
|
||||
controllers.uid AS controller_uid
|
||||
FROM
|
||||
relays
|
||||
INNER JOIN controllers ON controllers.id = relays.controller_id;
|
||||
Loading…
Add table
Add a link
Reference in a new issue