Files
ems/db/migration/V030__deye_clock_sync_at.sql

11 lines
764 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Čas posledního zápisu nebo „drift OK“ kontroly hodin Deye (6264); periodický re-sync i při malém driftu
ALTER TABLE ems.asset_inverter
ADD COLUMN IF NOT EXISTS deye_last_system_time_sync_at TIMESTAMPTZ;
COMMENT ON COLUMN ems.asset_inverter.deye_last_system_time_sync_at IS
'Okamžik posledního úspěšného zápisu 6264 (FC 0x10). Slouží k periodickému re-syncu každých 24h i při malém driftu; při přeskočení zápisu (malý drift) se sloupec nemění.';
COMMENT ON COLUMN ems.asset_inverter.deye_last_system_time_sync_minute IS
'UTC začátek pražské minuty posledního úspěšného zápisu 6264. Doplňuje se při zápisu času; rozhodování o řidším syncu je v aplikaci (drift + deye_last_system_time_sync_at).';