Files
elprice/resources/migrations/20260419010000-create-elprice.up.sql
T
magnusandClaude Opus 4.7 06b575d709 Add elprice table + JSON API (GET /api/elprice?date=...)
New `elprice` table with a simpler shape (time_dk, price_area,
price_dkk) backing a JSON endpoint that returns hourly DK1 + DK2
prices for any date. Cache-miss path fetches from the same
DayAheadPrices dataset as day_ahead_prices, upserts, and returns.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 12:36:01 +02:00

7 lines
173 B
SQL

CREATE TABLE elprice (
time_dk TIMESTAMP NOT NULL,
price_area VARCHAR(3) NOT NULL,
price_dkk NUMERIC(10,2) NOT NULL,
PRIMARY KEY (time_dk, price_area)
);