queries
This commit is contained in:
14
queries/create.sql
Normal file
14
queries/create.sql
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
CREATE TABLE pv_energy_by_month (
|
||||
id serial NOT NULL PRIMARY KEY,
|
||||
month integer NOT NULL,
|
||||
year integer NOT NULL,
|
||||
created_at timestamp NOT NULL DEFAULT now(),
|
||||
last_changed timestamp,
|
||||
update_counter integer NOT NULL DEFAULT 0,
|
||||
baseline_energy real NOT NULL,
|
||||
current_energy real NOT NULL DEFAULT 0.0,
|
||||
CONSTRAINT pv_energy_by_month__month_year_unique UNIQUE(month, year)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user