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

View File

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