-- [ENERGY] create type energy_param as enum ('PRICE', 'PATTERN', 'EFFIC'); -- GLOBAL PRICE / PATTERN / EFFIC value create table energy_global ( param energy_param not null , value numeric not null ); -- PUMP pumpID PRICE / PATTERN / EFFIC value create table energy_pump ( id varchar(32) references pumps(id) not null , param energy_param not null , value numeric not null ); -- DEMAND CHARGE value create table energy_demand_charge ( value numeric not null ); insert into energy_global (param, value) values ('PRICE', 0.0) , ('EFFIC', 75) ; insert into energy_demand_charge values (0.0) ;