dalsi fixly
Some checks failed
deploy / deploy (push) Failing after 9s
test / smoke-test (push) Has been cancelled

This commit is contained in:
Dusan Vojacek
2026-04-05 03:10:01 +02:00
parent 743b74d788
commit 38e5af5373
3 changed files with 97 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
-- telemetry_collector: INSERT … ON CONFLICT vyžaduje UNIQUE/PK odpovídající cíli konfliktu.
-- Stejná třída problému jako u market_interval_price (V032): DB bez primárních klíčů z V001.
-- Před ADD PK na hypertable voláme opravu katalogu chunků z V032 (funkce vytvořená tam).
SELECT ems._repair_ts_orphan_chunk_rows('ems', 'telemetry_inverter');
DO $$
BEGIN
@@ -18,6 +21,8 @@ BEGIN
END IF;
END $$;
SELECT ems._repair_ts_orphan_chunk_rows('ems', 'telemetry_ev_charger');
DO $$
BEGIN
IF EXISTS (
@@ -35,6 +40,8 @@ BEGIN
END IF;
END $$;
SELECT ems._repair_ts_orphan_chunk_rows('ems', 'telemetry_heat_pump');
DO $$
BEGIN
IF EXISTS (
@@ -56,3 +63,5 @@ END $$;
CREATE UNIQUE INDEX IF NOT EXISTS uidx_ev_session_charger_open
ON ems.ev_session (charger_id)
WHERE session_end IS NULL;
DROP FUNCTION IF EXISTS ems._repair_ts_orphan_chunk_rows(name, name);