aboutsummaryrefslogtreecommitdiffstats
path: root/snag/schema.sql
blob: 7ffa3d7de2a68dac38c2ffd55a0eadc8f22ee53c (plain)
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
create table devices (
	deviceId integer primary key autoincrement,
	deviceName text,
	deviceLocation text,
	dstAware integer
);
create table device_env (
	entry integer primary key autoincrement,
	deviceId integer,
	environment text,
	environmentDescription text
);
create table env_outdoor (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	temperature real,
	humidity real,
	pressure real,
	lux real,
	uv_intensity real
);
create table env_indoor (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	temperature real,
	humidity real,
	pressure real
);
create table env_enclosed (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	temperature real,
	humidity real,
	pressure real,
	light real
);
create table device_status (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	batteryCharge real,
	heaterRunning integer
);