fix gnss timestamp

This commit is contained in:
2025-01-29 23:03:48 +01:00
parent 59dc57a618
commit 62a2dc2c4a
5 changed files with 18 additions and 16 deletions

View File

@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS wifi_scan (
lp_ttn_end_device_uplinks_id UUID,
mac VARCHAR(255),
rssi NUMERIC,
scanned_at_utc DATE NOT NULL;
scanned_at_utc TIMESTAMP NOT NULL,
created_at_utc TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at_utc TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (lp_ttn_end_device_uplinks_id) REFERENCES lp_ttn_end_device_uplinks(lp_ttn_end_device_uplinks_id)
@ -64,7 +64,7 @@ CREATE TABLE IF NOT EXISTS location (
gnss_longitude DOUBLE,
ttn_gw_latitude DOUBLE,
ttn_gw_longitude DOUBLE,
gnss_location_at_utc DATE;
gnss_location_at_utc TIMESTAMP,
created_at_utc TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at_utc TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (lp_ttn_end_device_uplinks_id) REFERENCES lp_ttn_end_device_uplinks(lp_ttn_end_device_uplinks_id)