mirror of
https://github.com/warkanum/warkanums-pi-device-snippets.git
synced 2025-05-19 10:57:30 +00:00
10 lines
235 B
SQL
Executable File
10 lines
235 B
SQL
Executable File
CREATE TABLE sensordata
|
|
(
|
|
id bigserial NOT NULL,
|
|
sensor_type text,
|
|
data_read text,
|
|
time_read bigint,
|
|
time_changed bigint,
|
|
CONSTRAINT pk_id PRIMARY KEY (id),
|
|
CONSTRAINT k_typeread UNIQUE (sensor_type, time_read)
|
|
) |