PKGBUILD/pkg/repository/db/sqlite3/dml/insertOrUpdateDevice.sql
markus 366dccde12
fix: use go-migrate pkg to init or update db schema
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.
2021-01-30 15:44:21 +01:00

14 lines
288 B
SQL

INSERT INTO devices (
device_id,
device_name,
device_location,
creation_date,
update_date
)
VALUES ($1, $2, $3, $4, $5)
ON CONFLICT (device_id)
DO
UPDATE SET
device_name = EXCLUDED.device_name,
device_location = EXCLUDED.device_location,
update_date = date('now');