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>
11 lines
410 B
SQL
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
|
|
);
|