2020-05-21 15:40:24 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS temperatures (
|
2020-05-31 22:52:54 +00:00
|
|
|
id CHAR(37) PRIMARY KEY,
|
|
|
|
value NUMERIC(10,3) NOT NULL,
|
|
|
|
date TIMESTAMP NOT NULL,
|
|
|
|
sensor_id CHAR(37) NOT NULL,
|
|
|
|
creation_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
2020-05-21 15:40:24 +00:00
|
|
|
update_date TIMESTAMP,
|
|
|
|
FOREIGN KEY(sensor_id) REFERENCES sensors(sensor_id)
|
|
|
|
);
|