forked from Tafkas/solarpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_schema.sql
42 lines (42 loc) · 1.04 KB
/
db_schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
CREATE TABLE weather_data (
id INTEGER PRIMARY KEY NOT NULL,
created_at TEXT NOT NULL,
"temp" FLOAT,
pressure INTEGER,
temp_min FLOAT,
temp_max FLOAT,
humidity INTEGER,
wind_speed FLOAT,
wind_gust FLOAT,
wind_deg INTEGER,
clouds INTEGER,
rain INTEGER,
snow INTEGER,
weather_id INTEGER
);
CREATE TABLE IF NOT EXISTS "pvdata" (
id INTEGER PRIMARY KEY NOT NULL,
created_at DATETIME NOT NULL,
dc_1_u INTEGER,
dc_1_i REAL,
ac_1_u INTEGER,
ac_1_p INTEGER,
dc_2_u INTEGER,
dc_2_i REAL,
ac_2_u INTEGER,
ac_2_p INTEGER,
dc_3_u INTEGER,
dc_3_i REAL,
ac_3_u INTEGER,
ac_3_p INTEGER,
current_power INTEGER,
daily_energy REAL,
total_energy INTEGER
);
CREATE TABLE IF NOT EXISTS "electricity_data" (
id INTEGER PRIMARY KEY NOT NULL,
created_at DATETIME NOT NULL,
meter_180 REAL,
meter_280 REAL,
active_power REAL
);