-- PostgREST ems_anon: SELECT na views (repeatable – po R__vw_* ve stejném Flyway běhu).

GRANT SELECT ON ems.vw_site_status           TO ems_anon;
GRANT SELECT ON ems.vw_site_effective_price  TO ems_anon;
GRANT SELECT ON ems.vw_latest_inverter       TO ems_anon;
GRANT SELECT ON ems.vw_latest_heat_pump      TO ems_anon;
GRANT SELECT ON ems.vw_audit_today_hourly    TO ems_anon;
GRANT SELECT ON ems.vw_audit_daily           TO ems_anon;
GRANT SELECT ON ems.vw_audit_weekly          TO ems_anon;
GRANT SELECT ON ems.vw_mode_log_recent       TO ems_anon;
GRANT SELECT ON ems.vw_operating_mode        TO ems_anon;
GRANT SELECT ON ems.telemetry_inverter_hourly TO ems_anon;
GRANT SELECT ON ems.vw_telemetry_hourly_7d    TO ems_anon;
GRANT SELECT ON ems.telemetry_heat_pump       TO ems_anon;
GRANT SELECT ON ems.forecast_accuracy              TO ems_anon;
GRANT SELECT ON ems.vw_forecast_accuracy_by_lead_time TO ems_anon;
GRANT SELECT ON ems.vw_forecast_accuracy_daily     TO ems_anon;
GRANT SELECT ON ems.consumption_baseline_stats     TO ems_anon;
GRANT SELECT ON ems.market_price_stats             TO ems_anon;
GRANT SELECT ON ems.tuv_usage_stats                TO ems_anon;
