Files
elprice/resources/migrations/20260214120000-create-day-ahead-prices.up.sql
magnusandClaude Opus 4.6 1b600ad8d4 Fetch and display day-ahead electricity spot prices from Energi Data Service
Adds a prices controller that fetches DK1/DK2 hourly spot prices via the
Energi Data Service API, stores them in PostgreSQL, and displays today's
and tomorrow's DK1 prices on the home page in øre/kWh. An HTMX "Refresh
Prices" button triggers the fetch-and-display cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 12:23:40 +01:00

9 lines
253 B
SQL

CREATE TABLE day_ahead_prices (
time_utc TIMESTAMPTZ NOT NULL,
time_dk TIMESTAMP NOT NULL,
price_area VARCHAR(3) NOT NULL,
price_dkk NUMERIC(10,2),
price_eur NUMERIC(10,6),
PRIMARY KEY (time_utc, price_area)
);