20 lines
545 B
MySQL
20 lines
545 B
MySQL
|
-- +goose Up
|
||
|
-- +goose StatementBegin
|
||
|
CREATE TABLE IF NOT EXISTS opendtu_inverters_inv (
|
||
|
-- id SERIAL PRIMARY KEY,
|
||
|
timestamp TIMESTAMPTZ,
|
||
|
-- FOREIGN KEY (timestamp) REFERENCES opendtu_log(timestamp),
|
||
|
inverter_serial TEXT,
|
||
|
temperature NUMERIC,
|
||
|
power_dc NUMERIC,
|
||
|
yieldday NUMERIC,
|
||
|
yieldtotal NUMERIC,
|
||
|
efficiency NUMERIC
|
||
|
);
|
||
|
|
||
|
CREATE INDEX IF NOT EXISTS opendtu_inverters_inv_timestamp_idx ON opendtu_inverters_inv (timestamp);
|
||
|
-- +goose StatementEnd
|
||
|
-- +goose Down
|
||
|
-- +goose StatementBegin
|
||
|
-- +goose StatementEnd
|