Skip existing prices on insert and add unique index on (time_dk, price_area)

Changed upsert to INSERT ON CONFLICT DO NOTHING so existing prices are
never overwritten. Added unique index on (time_dk, price_area) to enforce
no duplicate quarter-hour entries per area.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 13:14:28 +01:00
co-authored by Claude Opus 4.6
parent 9554e511ad
commit 97a95684cf
4 changed files with 7 additions and 8 deletions
@@ -0,0 +1 @@
CREATE UNIQUE INDEX idx_day_ahead_prices_time_dk_area ON day_ahead_prices (time_dk, price_area);