write voltage to database
This commit is contained in:
@ -26,6 +26,15 @@ CREATE TABLE measurement_t (
|
||||
|
||||
SELECT create_hypertable('measurement_t', 'time');
|
||||
|
||||
CREATE TABLE voltage_t (
|
||||
time TIMESTAMP WITHOUT TIME ZONE NOT NULL,
|
||||
device_name VARCHAR(16) NOT NULL,
|
||||
voltage INTEGER
|
||||
);
|
||||
|
||||
SELECT create_hypertable('voltage_t', 'time');
|
||||
|
||||
|
||||
insert into device_t (device_id, label) values('eui-43fa12f400006c88', 'badesee');
|
||||
insert into sensor_t (address, label, index, device)
|
||||
values (13258914387362694952, '0,5m ', 0, 1),
|
||||
@ -36,3 +45,4 @@ insert into sensor_t (address, label, index, device)
|
||||
create user preprocessor password 'geheim';
|
||||
grant select on device_t, sensor_t to preprocessor;
|
||||
grant insert on measurement_t to preprocessor;
|
||||
grant insert on voltage_t to preprocessor;
|
||||
|
Reference in New Issue
Block a user