10 lines
573 B
MySQL
10 lines
573 B
MySQL
|
CREATE TABLE IF NOT EXISTS pressures (
|
||
|
pressure_id CHAR(37) PRIMARY KEY,
|
||
|
pressure_value NUMERIC(10,3) NOT NULL,
|
||
|
pressure_from_date TIMESTAMP NOT NULL,
|
||
|
pressure_till_date TIMESTAMP,
|
||
|
sensor_id CHAR(37) NOT NULL,
|
||
|
creation_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||
|
update_date TIMESTAMP,
|
||
|
FOREIGN KEY(sensor_id) REFERENCES sensors(sensor_id)
|
||
|
);
|