aboutsummaryrefslogtreecommitdiffstats
path: root/snag/schema.sql
diff options
context:
space:
mode:
authorMatt Kohls <mattkohls13@gmail.com>2023-09-04 15:36:33 -0400
committerMatt Kohls <mattkohls13@gmail.com>2023-09-04 15:36:33 -0400
commitc8ef8843aaaf28bc38b544ae8ac72accf233aead (patch)
tree53e846d7480814040bbebe11dd6e290f5d366589 /snag/schema.sql
downloadsensor-aggregator-c8ef8843aaaf28bc38b544ae8ac72accf233aead.tar.gz
sensor-aggregator-c8ef8843aaaf28bc38b544ae8ac72accf233aead.tar.bz2
sensor-aggregator-c8ef8843aaaf28bc38b544ae8ac72accf233aead.zip
Revamped project init
New repo for larger structural changes from Sensor-Server. Currently doing most all the same stuff but hopefully better. Still have to clean out some of the older templates for the new interface
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
+);
+