-
Notifications
You must be signed in to change notification settings - Fork 8
/
MariaDB-tables.txt
45 lines (41 loc) · 1.08 KB
/
MariaDB-tables.txt
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
43
44
45
DROP TABLE IF EXISTS `interval`;
CREATE TABLE `interval` (
`id` int unsigned NOT NULL auto_increment,
`epoch` int unsigned NOT NULL,
`DC_s1_v` float,
`DC_s2_v` float,
`pf_feed` float,
`pf_inv` float,
`pow_prod` float,
`pow_feed` float,
`eng_tot_prod` int unsigned,
`eng_tot_out` int unsigned,
`eng_tot_in` int unsigned,
`volt_feed` float,
`cur_inv` float,
`freq_feed` float DEFAULT 50.0,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `daily`;
CREATE TABLE `daily` (
`id` int unsigned NOT NULL auto_increment,
`epoch` int unsigned NOT NULL,
`thres_rise_epoch` int unsigned,
`thres_fall_epoch` int unsigned,
`thres_perc_exp` float,
`pow_max` float,
`eng_day` int unsigned,
`eng_tot_prod` bigint unsigned,
`eng_tot_out` int unsigned,
`eng_tot_in` int unsigned,
`error_flag` bit,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
`id` int unsigned NOT NULL auto_increment,
`epoch` int unsigned NOT NULL,
`level` int unsigned,
`message` text NOT NULL,
PRIMARY KEY (`id`)
);