sql first refactor
This commit is contained in:
17
db/views/R__vw_asset_heat_pump_modbus_poll.sql
Normal file
17
db/views/R__vw_asset_heat_pump_modbus_poll.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
drop view if exists ems.vw_asset_heat_pump_modbus_poll;
|
||||
|
||||
create view ems.vw_asset_heat_pump_modbus_poll as
|
||||
select
|
||||
hp.site_id,
|
||||
hp.id as heat_pump_id,
|
||||
hp.code,
|
||||
se.host,
|
||||
se.port,
|
||||
se.unit_id
|
||||
from ems.asset_heat_pump hp
|
||||
join ems.site_endpoint se on se.id = hp.endpoint_id
|
||||
where se.enabled = true
|
||||
and se.endpoint_type = 'modbus_tcp';
|
||||
|
||||
comment on view ems.vw_asset_heat_pump_modbus_poll is
|
||||
'TČ s Modbus TCP pro telemetry_collector.';
|
||||
Reference in New Issue
Block a user