Refine energy table
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
-- [ENERGY]
|
||||
|
||||
create table energy_global
|
||||
create table energy
|
||||
(
|
||||
_no integer primary key
|
||||
, price numeric not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
, effic numeric not null
|
||||
, demand_charge numeric not null
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into energy_global (_no, price, pattern, effic, demand_charge)
|
||||
values (0, 0.0, null, 75, 0.0);
|
||||
insert into energy (key, value) values
|
||||
('GLOBAL PRICE', '0.0')
|
||||
, ('GLOBAL PATTERN', '')
|
||||
, ('GLOBAL EFFIC', '75')
|
||||
, ('DEMAND CHARGE', '0.0')
|
||||
;
|
||||
|
||||
create table energy_pump_price
|
||||
(
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
-- [ENERGY]
|
||||
|
||||
drop table if exists energy_pump_effic;
|
||||
|
||||
drop table if exists energy_pump_pattern;
|
||||
|
||||
drop table if exists energy_pump_price;
|
||||
|
||||
drop table if exists energy_global;
|
||||
drop table if exists energy;
|
||||
|
||||
Reference in New Issue
Block a user