mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-19 01:25:37 -05:00
Initial commit from private
This commit is contained in:
24
Weather/Service/Data/Resources/Schema.sql
Normal file
24
Weather/Service/Data/Resources/Schema.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS weather_reading
|
||||
(
|
||||
timestamp timestamptz NOT NULL
|
||||
CONSTRAINT weather_reading_pk
|
||||
PRIMARY KEY,
|
||||
wind_direction int NOT NULL,
|
||||
wind_speed double precision NOT NULL,
|
||||
humidity double precision NOT NULL,
|
||||
humidity_temperature double precision NOT NULL,
|
||||
rain double precision NOT NULL,
|
||||
pressure double precision NOT NULL,
|
||||
pressure_temperature double precision NOT NULL,
|
||||
battery_level double precision NOT NULL,
|
||||
light_level double precision NOT NULL,
|
||||
latitude double precision NOT NULL,
|
||||
longitude double precision NOT NULL,
|
||||
altitude double precision NOT NULL,
|
||||
satellite_count double precision NOT NULL,
|
||||
gps_timestamp timestamptz NOT NULL
|
||||
);
|
||||
|
||||
SELECT create_hypertable('weather_reading', 'timestamp', if_not_exists => TRUE);
|
||||
Reference in New Issue
Block a user