Implement proper DB migrations using Goose. Upgrade go packages.
This commit is contained in:
parent
6902facab6
commit
444e5065a4
12 changed files with 255 additions and 117 deletions
14
migrations/00001_log.sql
Normal file
14
migrations/00001_log.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE IF NOT EXISTS opendtu_log (
|
||||
timestamp TIMESTAMPTZ UNIQUE DEFAULT CURRENT_TIMESTAMP,
|
||||
power NUMERIC,
|
||||
yieldday NUMERIC,
|
||||
yieldtotal NUMERIC
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS opendtu_log_timestamp_idx ON opendtu_log (timestamp);
|
||||
-- +goose StatementEnd
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
-- +goose StatementEnd
|
Loading…
Add table
Add a link
Reference in a new issue