aboutsummaryrefslogtreecommitdiffstats
path: root/snag/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'snag/schema.sql')
-rw-r--r--snag/schema.sql46
1 files changed, 46 insertions, 0 deletions
diff --git a/snag/schema.sql b/snag/schema.sql
new file mode 100644
index 0000000..9c4dfda
--- /dev/null
+++ b/snag/schema.sql
@@ -0,0 +1,46 @@
+create table devices (
+ deviceId integer primary key autoincrement,
+ deviceName text,
+ deviceLocation text
+);
+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
+);
+