gateway_db.sql 993 Bytes
Newer Older
Vladislav Rykov's avatar
Vladislav Rykov committed
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
46
47
48
49
50
51
52
53
54
55
56
DROP DATABASE IF EXISTS gateway;

CREATE DATABASE gateway;

\c gateway

ALTER DATABASE gateway OWNER TO root;

CREATE TABLE esp32 (
    utc numeric(10,0),
    timedate character varying(100),
    dht22_t_esp real,
    dht22_h_esp real,
    sht85_t_esp real,
    sht85_h_esp real,
    hih8121_t_esp real,
    hih8121_h_esp real,
    tmp36_0_esp real,
    tmp36_1_esp real,
    tmp36_2_esp real,
    hih4030_esp real,
    hh10d_esp real,
    dht22_t_wis real,
    dht22_h_wis real,
    sht85_t_wis real,
    sht85_h_wis real,
    hih8121_t_wis real,
    hih8121_h_wis real,
    tmp102_wis real,
    hh10d_wis real,
    dht22_t_mkr real,
    dht22_h_mkr real,
    sht85_t_mkr real,
    sht85_h_mkr real,
    hih8121_t_mkr real,
    hih8121_h_mkr real,
    hh10d_mkr real
);


ALTER TABLE esp32 OWNER TO root;

--
-- Name: pend_msgs; Type: TABLE; Schema: public; Owner: root
--

CREATE TABLE pend_msgs (
    dev_id numeric(3,0) NOT NULL,
    msg bytea
);


ALTER TABLE pend_msgs OWNER TO root;