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