Files
elprice/resources/migrations/20260419000000-create-solar.up.sql
magnusandClaude Opus 4.7 ce1c3822a2 Add solar table migration
Records hourly solar panel readings imported from /home/pmp/ai/solar/csv
by the sibling repo's import-csv.mjs. Schema includes only the 8
columns that always carry data; the 5 always-empty CSV columns are
dropped.

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

11 lines
410 B
SQL

CREATE TABLE solar (
period_start TIMESTAMPTZ PRIMARY KEY,
pv_yield_kwh DOUBLE PRECISION NOT NULL,
inverter_yield_kwh DOUBLE PRECISION NOT NULL,
export_kwh DOUBLE PRECISION NOT NULL,
import_kwh DOUBLE PRECISION NOT NULL,
charge_kwh DOUBLE PRECISION NOT NULL,
discharge_kwh DOUBLE PRECISION NOT NULL,
revenue_eur DOUBLE PRECISION NOT NULL
);