From c8ef8843aaaf28bc38b544ae8ac72accf233aead Mon Sep 17 00:00:00 2001 From: Matt Kohls Date: Mon, 4 Sep 2023 15:36:33 -0400 Subject: 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 --- snag/schema.sql | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 snag/schema.sql (limited to 'snag/schema.sql') 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 +); + -- cgit v1.2.3