markus
366dccde12
Instead to implement own logic how the database scheme should be updated or migrated to a newer or older version flucky use now instead the go-migrate package.
16 lines
279 B
SQL
16 lines
279 B
SQL
INSERT INTO humidities (
|
|
id,
|
|
value,
|
|
date,
|
|
sensor_id,
|
|
creation_date,
|
|
update_date
|
|
)
|
|
VALUES ($1, $2, $3, $4, $5, $6)
|
|
ON CONFLICT (id)
|
|
DO
|
|
UPDATE SET
|
|
value = EXCLUDED.value,
|
|
date = EXCLUDED.date,
|
|
sensor_id = EXCLUDED.sensor_id,
|
|
update_date = date('now'); |