fix repeatable migrations
This commit is contained in:
19
db/views/R__071_vw_telemetry_15m_7d.sql
Normal file
19
db/views/R__071_vw_telemetry_15m_7d.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- =============================================================
|
||||
-- R__071_vw_telemetry_15m_7d.sql
|
||||
-- EMS Platform – telemetrie střídače po 15 min (dashboard sloty)
|
||||
-- Repeatable migration – jedna aktuální definice view
|
||||
-- =============================================================
|
||||
-- Zdroj: continuous aggregate ems.telemetry_inverter_15m (V039).
|
||||
-- security_invoker=false: PostgREST ems_anon čte bez GRANT na podkladový CA.
|
||||
|
||||
CREATE OR REPLACE VIEW ems.vw_telemetry_15m_7d
|
||||
WITH (security_invoker = false)
|
||||
AS
|
||||
SELECT *
|
||||
FROM ems.telemetry_inverter_15m
|
||||
WHERE slot_start >= now() - INTERVAL '7 days'
|
||||
ORDER BY slot_start DESC;
|
||||
|
||||
COMMENT ON VIEW ems.vw_telemetry_15m_7d IS
|
||||
'Telemetrie střídače po 15 min za 7 dní (zdroj: telemetry_inverter_15m).
|
||||
security_invoker=false: čtení přes PostgREST role ems_anon bez GRANT na podkladový CA.';
|
||||
Reference in New Issue
Block a user