Files
elprice/resources/migrations/20260419020000-add-elprice-tariff-total.down.sql
magnusandClaude Opus 4.7 da20691d2b Add tariff_dkk + total_dkk to elprice
Each hourly row now carries the N1 time-of-use tariff (øre/kWh × 10
to match the DKK/MWh unit of price_dkk) and the combined consumer
price (spot + tariff). Existing rows are backfilled in the migration
with a CASE expression mirroring tariffs/tariff-for-hour; new writes
compute it in the controller. API response exposes both fields.

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

4 lines
92 B
SQL

ALTER TABLE elprice DROP COLUMN total_dkk;
--;;
ALTER TABLE elprice DROP COLUMN tariff_dkk;