Created
October 5, 2020 00:41
-
-
Save garystafford/2d2e51c51cb579b5cfe3c7da3fd9b78b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS sensor_data ( | |
time timestamptz NOT NULL, | |
device_id text NOT NULL, | |
temperature double PRECISION NOT NULL, | |
humidity double PRECISION NOT NULL, | |
lpg double PRECISION NOT NULL, | |
co double PRECISION NOT NULL, | |
smoke double PRECISION NOT NULL, | |
light boolean NOT NULL, | |
motion boolean NOT NULL | |
); | |
SELECT create_hypertable('sensor_data', 'time'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment