Add relay view to faster load controller_uid

This commit is contained in:
Tobias Reisinger 2024-06-11 14:10:25 +02:00
parent 277b159200
commit d4ff664f74
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
16 changed files with 146 additions and 81 deletions

View file

@ -0,0 +1 @@
DROP VIEW v_relays;

View 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;