Refine energy table

This commit is contained in:
WQY\qiong
2022-11-14 20:02:45 +08:00
parent 1534301618
commit b0815f75eb
2 changed files with 12 additions and 9 deletions

View File

@@ -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
( (

View File

@@ -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;